Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Catch all unhandled exceptions

1 REPLY 1
Reply
Message 1 of 2
afirmation
412 Views, 1 Reply

Catch all unhandled exceptions

Hello,



I want for my add-in to catch all unhadled exceptions and show them in a message box. This is required as Inventor crashes at all unhandled exception, and it is kind of hard and bad looking to put try{}catch(Exception ex){ } everywhere.





I tried (like in my usual WIndows Forms applications) to put:

System.Windows.Forms.Application.ThreadException += new ThreadExceptionEventHandler(OnThreadException);

AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);





but this seems not to have any effect, the exceptions are not being caught.
1 REPLY 1
Message 2 of 2
t.classen
in reply to: afirmation

Hi,

 

i know this topic is old but i have the same problem. Is there a solution for this?

 

Or how do you handle that?

 

Thanks and regards,

 

Tim

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report