
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 <EVENT_RAISE_ERROR>
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 <EVENT_RAISE_TRANS_EXIT>
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?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
handler Handler2 <EVENT_RAISE_PROC_EXIT>
var
nErr : number;
begin
ErrorAdd(FACILITY_BROWSERENGINE, 46, SEVERITY_SUCCESS);
ErrorAdd(FACILITY_BROWSERENGINE, 7, SEVERITY_SUCCESS);
if 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 Handler2;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
handler Handler2 <EVENT_RAISE_PROC_EXIT>
var
nErr : number;
begin
ErrorAdd(FACILITY_BROWSERENGINE, 46, SEVERITY_SUCCESS);
ErrorAdd(FACILITY_BROWSERENGINE, 7, SEVERITY_SUCCESS);
if 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 Handler2;