Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qliker2
Contributor II
Contributor II

Best Practice Error Handling in Script

Is there any best practice on how to implement error handling in QS scripts?

My approach is to set ErrorMode=0 and then to handle Exceptions as proposed in Qlik Sense Help:

 

set ErrorMode=0;

LOAD * from abc.qvf;

if ScriptError=8 then

exit script;

//no file;

end if

 

However, if you do multiple loads in one script, you probably want to know if you had any errors and which load statements were affected.  How can you Iog the errors and related objects to a table/qvd which you can then report? Or is there another way to do proper error handling?

Labels (3)
1 Solution
2 Replies
Brett_Bleess
Former Employee
Former Employee

@qliker2 The following Design Blog may be of some further use:

https://community.qlik.com/t5/Qlik-Design-Blog/Error-Variables/ba-p/1464402

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.