This document is archived and information here might be outdated.  Recommended version.


Error handling and debugging (ArcObjects .NET 10.5 SDK)

Error handling and debugging


In this topic


Error handling

An important part of developing a robust program is including error handling. It will save the application from entering an unknown state or crashing when the unexpected occurs. As a .NET developer, use the Try, Catch, and Finally constructs to handle these errors. Since ArcObjects are based on Component Object Model (COM) technology, the ArcObjects calls return errors as HRESULTS, which are in turn used to populate a COMException.

Debugging

When an application doesn't have the expected or desired functionality, the issues (bugs) need to be found so that the code can be debugged. When programming with the ArcGIS applications, there are tools available to assist in your debugging efforts, such as the ESRI Symbol Server and Error Reports, configured through registry settings.


See Also:

How to implement error handling
ArcObjects error codes
Debugging crashes using the ESRI Symbol Server
Error report registry settings