http://www.charlesandhudson.com/archives/hand-tools-list-important.jpgPPT_LOGO_4b
‹#›
Autodesk Developer Network, April 2010
The Rice – Revit Exceptions
•API methods throw subclasses of Autodesk.Revit.Exceptions.ApplicationException.
•Similar to .NET System Exceptions:
§ArgumentException
§InvalidOperationException
§FileNotFoundExceptions
•Some subclasses unique to Revit, e.g:
§AutoJoinFailedException
§RegenerationFailedException
§ModificationOutsideTransactionException
•InternalException:
§Contains extra diagnostic information which can be passed back to Autodesk for diagnosis.
C:\Documents and Settings\walmslk\Local Settings\Temporary Internet Files\Content.IE5\EARWAUQM\MPj04096740000[1].jpg
The structure of the Exception structure has been changed to make it in conjunction with the .NET system exceptions. And we also have subclasses out of which some exceptions that are unique to Revit only. This was done so that API users (developers) would know more when any exception was thrown and in the previous setup it wasn’t quite clear. This subclassing helped us provide some additional information that will help you in your development and debugging process (instead of giving a generic say InvalidOperation exception). Besides these, there might still be exceptions that the Engg team did not anticipate and these will be under InternalException. You can share this with support team and we can help diagnose what actually went wrong and probably help us add a new subclass exception in future to handle such exceptions.