Skip to content

Commit

Permalink
Update EvalBat_vbs.vbs
Browse files Browse the repository at this point in the history
Soft fail on errors
  • Loading branch information
adisak committed Dec 23, 2022
1 parent 44aaf37 commit f3382f6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/EvalBat_vbs.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,26 @@ If objArgs.Count >= 1 Then
Next
REM Support double quotes for strings using two single quotes in a row
allArgs=Replace(allArgs,"''","""")
On Error Resume Next
wscript.echo eval(allArgs)
REM Uncomment the following line for Debugging
' CheckForError
On Error Goto 0
Else
wscript.echo "0"
End If

Wscript.Quit

REM -----------------------------------
Sub CheckForError
If Err.Number <> 0 Then
'Print Error for Debugging
WScript.Echo "Error: " & Err.Number & " Srce: " & Err.Source & " Desc: " & Err.Description
Err.Clear
End If
End Sub

REM -----------------------------------
REM Expand the functions supported
REM Additional Helpful Functions
Expand Down

0 comments on commit f3382f6

Please sign in to comment.