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!
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.