Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Fetch Error code value in the variable

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.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes.  To get the number of the script error:

LET vCheck=num(ScriptError);

to get the text of the ScriptError:

LET vCheck=ScriptError;


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

4 Replies
YoussefBelloum
Champion
Champion

read the comment of MLH Group Jameson this  Re: Error handling in script

el_aprendiz111
Specialist
Specialist

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;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes.  To get the number of the script error:

LET vCheck=num(ScriptError);

to get the text of the ScriptError:

LET vCheck=ScriptError;


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Anonymous
Not applicable
Author

Thanks, Rob!