Question: I catch generally unhandled exceptions with
AddHandler System.AppDomain.CurrentDomain.UnhandledException, AddressOf OnUnhandledException
The problem now is, with this exception handler
Public Sub OnUnhandledException(ByVal sender As Object, ByVal e As UnhandledExceptionEventArgs)
Console.WriteLine(e.ExceptionObject.ToString())
Console.WriteLine("Press Enter to continue")
Console.ReadLine()
'Environment.Exit(1)
End Sub
program execution still throws the exception if I don't exit the program.
Now I want to know how I can change that to a 'on error resume next' behaviour ? Is it possible at all ?
<STAThread()> _
Public Sub Main(ByVal argv As String())
'For i As Integer = 0 To argv.Length - 1 Step 1
'Console.WriteLine("Argument {0}: {1}", i, argv(i))
'Next i
AddHandler System.AppDomain.CurrentDomain.UnhandledException, AddressOf OnUnhandledException
Throw New Exception("Test")
Console.WriteLine("Continue")
End sub