Catching COM-Exceptions from ArcObjects
How to catch COMException errors from the ArcObjects library in C#, inspect their error codes, and identify specific ArcObjects error constants.
to catch the COM-Exception in own applications thrown from the underlaying ArcObjects-Library could be done with:
catch (COMException ComEx)
{
Console.WriteLine(string.Format("MyCode errored: {0}, Error Code: {1}",
ComEx.Message, ComEx.ErrorCode));
}
the special error constants could be found under:
ArcObjects Library Reference (GeoDatabase) - fdoError Constants