A
AG
Can anyone point me to an example or info on handling unhandled exceptions
in a console application?
Preferrably VB.
Thanks,
in a console application?
Preferrably VB.
Thanks,
Be aware that this technique does not scale to services or multipleLuc said:you can try
if (Args.IsTerminating) Environment.Exit (0) ;
where Args is your UnhandledExceptionEventArgs
skipped.
I also suggest passing a non-zero value to Environment.Exit(), since
processes that check the exit status (if any) will usually interpret a
zero exit status as success, which is a tad misleading.
In short, I'm not at all happy that this actually works.
unable to provide your own try/catch block in order to handle the
exception. Your original question implies this, but if it's not really
true, then obviously the best solution is to actually handle the
exception.