Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day!
Can anyone advice please, if is it possible to fetch script error code in the variable?
Like:
Set vCheck=ScriptError
if(vCheck=0) then
//Continue
Else
//Stop
End if
Thanks.
Yes. To get the number of the script error:
LET vCheck=num(ScriptError);
to get the text of the ScriptError:
LET vCheck=ScriptError;
-Rob
read the comment of MLH Group James on this Re: Error handling in script
Hi
0 | No error |
1 | General error |
2 | Syntax error |
3 | General ODBC error |
4 | General OLE DB error |
5 | General custom database error |
6 | General XML error |
7 | General HTML error |
8 | File not found |
9 | Database not found |
10 | Table not found |
11 | Field not found |
12 | File has wrong format |
13 | BIFF error |
14 | BIFF error encrypted |
15 | BIFF error unsupported version |
16 | Semantic error |
SET ErrorMode = 0;
LOAD * FROM mydfile.qvd (qvd);
IF ScriptError>1 AND ScriptError<>8 THEN
TRACE File not found;
ELSE
TRACE File loaded;
END IF
SET ErrorMode = 1;
Yes. To get the number of the script error:
LET vCheck=num(ScriptError);
to get the text of the ScriptError:
LET vCheck=ScriptError;
-Rob
Thanks, Rob!