PROBLEM
When running an ArcObjects application written in Visual Studio .NET, the code stops executing, but does not return an error.
Exception handling needs to be added to the application.
Code:
try
{
//Code that might cause an error
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
//cleanup code goes here
}
Code:
Try
'Code that might cause an error
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
End Try
Get help from ArcGIS experts
Download the Esri Support App