Skip to content

Instantly share code, notes, and snippets.

@toxn12
Created December 10, 2014 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toxn12/fc7ed6216c032edf4755 to your computer and use it in GitHub Desktop.
Save toxn12/fc7ed6216c032edf4755 to your computer and use it in GitHub Desktop.
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