Hi everyone.
I have the following code:
'..... end of my code .....
Exception err As IOException
MessageBox("ERROR: " + error.Message + EndOfLine + "Error num: " + Str(error.ErrorNumber))
Quit
//HERE MY DOUBT:
Exception error As RuntimeException
If error IsA EndException Or errot IsA ThreadEndException Then
Raise error
End If
MessageBox("ERROR: " + error.Message + EndOfLine + "Error num: " + Str(error.ErrorNumber))
Quit
I cannot use the following method because it is not correct:
Exception error As RuntimeException
MessageBox("ERROR: " + error.Message + EndOfLine + "Error num: " + Str(error.ErrorNumber))
Quit
The Exception documentation recommends this:
Exception err As RuntimeException // Will catch any exception without discrimination
If err IsA EndException Or err IsA ThreadEndException Then
Raise err // Re-raise the exception
End If
//Continue your code here
Is my MessageBox being intercepted correctly??
It makes me confused having to release the error again: Raise error
Exception error As RuntimeException
If error IsA EndException Or errot IsA ThreadEndException Then
Raise error
End If
MessageBox("ERROR: " + error.Message + EndOfLine + "Error num: " + Str(error.ErrorNumber))
Quit