Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: IntControl 38 and 73 and WbErrorHandler Subroutine
Recently I upgraded my Winbatch from 2002b to 2002g, after that it seems that the IntControl 73 isn't working anymore.
I DebugTraced a script and when it encountered a non-fatal error it did NOT gosub to the WBERRORHANDLER subroutine. It also did not record anything in the file specified by the IntControl 38 function. All it seemed to do is ignore the error and keep running the script.
This is not the way it worked before the upgrade to 2002g.
Was something changed in one or both of these two functions that prevents them from being used simultaneously?
The snippet below is the UDF that I use to activate or de-activate the ErrorHandler.
#DefineFunction ErrorHandler(Mode) if Mode==@On then ErrorMode(@Off) IntControl(38,1,"c:\wblog.txt",0,0) IntControl(73,2,0,0,0) endif if Mode==@Off then IntControl(73,0,0,0,0) IntControl(38,0,0,0,0) ErrorMode(@Normal) endif Return #EndFunction
So your UDF/UDS needs its OWN :ERRORHANDLER label within the function definition.
What was happening was that the UDS could not find a WBERRORHANDLER label so it gave up on it and called a normal error.
Article ID: W15152
File Created: 2002:09:05:13:50:06
Last Updated: 2002:09:05:13:50:06