I have a batch file that calls a VBScript (.vbs) program. After calling it, my batch script checks %errorlevel% to see if the .vbs program failed. I can signa
%errorlevel%
As you say, all that's available is On Error Resume Next, so your forced to use the pattern:
On Error Resume Next
On Error Resume Next ThingWithAChanceOfThrowingAnError ... If (Err.number <> 0) then PrintErrorAndQuitWith1(Err.Description)