Hello All,
I'm trying to figure out how to catch unhandled exceptions in my add-in. Can anyone provide some sample code on where the definitions are placed? I'm also trying to log these exceptions to view later in the windows Event Viewer)
This is all an attempt to find out why my add-in has crashed another users instance of Inventor with no warning (naturally, all works fine on my machine)
The examples I've found so far cover windows form applications, but not class library objects.
Thanks,
John
Hello
Include your code in a try-catch construct, so you can see the exception as it appears.
Try
'here comes your code
Catch ex As Exception
MessageBox(ex.Message & vbNewLine & vbNewLine & ex.ToString)
End Try
I don't know how to give these exceptions to windows eventlog. Maybe you can write your own logfile. Take a look at his example http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx