Created
December 10, 2014 09:18
-
-
Save toxn12/fc7ed6216c032edf4755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Module1 | |
Sub Main() | |
testOnErrorResumeNext() | |
testTryCatch() | |
End Sub | |
Sub testOnErrorResumeNext() | |
On Error Resume Next | |
Throw New Exception() | |
Throw New NullReferenceException() | |
Throw New DivideByZeroException() | |
Throw New ArgumentException() | |
End Sub | |
Sub testTryCatch() | |
Try | |
Throw New Exception() | |
Catch ex As Exception | |
End Try | |
Try | |
Throw New NullReferenceException() | |
Catch ex As Exception | |
End Try | |
Try | |
Throw New DivideByZeroException() | |
Catch ex As Exception | |
End Try | |
Try | |
Throw New ArgumentException() | |
Catch ex As Exception | |
End Try | |
End Sub | |
End Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment