I'm attempting to capture a few errors generated by BDF scripts in Silk Performer 16.5, and rewrite them for reporting purposes. So far I can accurately capture errors 46 and 65, but am now trying to capture and rewrite error 7. The code that doesn't capture this appropriately is below: dclevent handler Handler0 var nErr : number; begin if GetErrorCode(GetLastError()) = 46 then nErr := CreateErrorCode(FACILITY_GUILEVEL_TESTING_REPLAY, 3, SEVERITY_ERROR); trueLogInfo("Intercepted error BrowserEngine: 46"); RaiseError(nErr, NULL, SEVERITY_TRANS_EXIT); elseif GetErrorCode(GetLastError()) = 7 then nErr := CreateErrorCode(FACILITY_GUILEVEL_TESTING_REPLAY, 3, SEVERITY_ERROR); trueLogInfo("Intercepted error BrowserEngine: 7"); RaiseError(nErr, NULL, SEVERITY_TRANS_EXIT); end; end Handler0; handler Handler1 var nErr : number; begin ErrorAdd(FACILITY_BROWSERENGINE, 46, SEVERITY_SUCCESS); ErrorAdd(FACILITY_BROWSERENGINE, 7, SEVERITY_SUCCESS); if GetErrorCode(GetLastError()) = 65 then nErr := CreateErrorCode(FACILITY_GUILEVEL_TESTING_REPLAY, 3, SEVERITY_ERROR); trueLogInfo("Intercepted error BrowserEngine: 65"); RaiseError(nErr, NULL, SEVERITY_TRANS_EXIT); end; end Handler1; What am I missing?
↧