Created
January 5, 2018 07:20
-
-
Save gocha/337b5e904d041cd912f95607889fe0b8 to your computer and use it in GitHub Desktop.
[VBScript] Error Handling (exit with status 1, if a runtime error is raised)
This file contains hidden or 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
Call EntryPoint | |
Sub EntryPoint() | |
On Error Resume Next | |
Call Main | |
If Err <> 0 Then | |
WScript.Echo Err.Source & ": " & Err.Description & " (Error " & Err.Number & ")" | |
WScript.Quit(1) | |
End If | |
End Sub | |
Sub Main() | |
' TODO write your code here | |
foo | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment