I am trying to write a catch-all exception handler in my VB.NET application.
I started out by writing a handler routine and directing the execution to it with
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf Me.UnhandledExceptionHandler
This works fine whilst working through Visual Studio but as soon as I publish the app and run it on another machine it doesn't. It simply behaves as usual and reports the error with the option to Quit or Continue.
Can anyone explain this to me?
Alternatively, I started looking at using
but get an error about setting the value before initialising any controls. Can anyone explain where I would set the Unhandled Exception Mode and how I direct it to a user-defined routine.
Many thanks in advance