Ok, I can trap the COM exception and convert the ErrorCode to the proper enum, (e.g. esriGeometryError.E_GEOMETRY_WRONGTYPE). But is there a way to get the error description from the enum? For example, when I mouse over esriGeometryError.E_GEOMETRY_WRONGTYPE in Visual Studio I get a popup that says "The geometry parameter was of the wrong type for the method." It would be great to retrieve that information programatticaly once the exception is trapped. Any help greatly appreciated!
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
The Message property of the COMException will contain the string you are looking for. See this article for code examples of error handling with HRESULTS and messages. |
|||
|
|
