Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ScriptErrorDetails

Hi,

I try to manage error from my appli and I have a question for ScriptErrorDetails:

Why did he turn "NULL" after an error ?

Data:

LOAD * INLINE [

F1

A

B

C

];

LET NbRows=NoOfRows('Data');

STORE Datas Into (txt);

TEMP2:

                          First 1 LOAD

                          '$(NbRows)' as NB_ROWS,

                                    '$(ScriptErrorCount)' as ERROR_SEQ_NUMBER,

                                    '$(#ScriptError)' as ERROR_ID,

                                    '$(ScriptError)' as ERROR_NAME,

                                    '$(ScriptErrorDetails)' as ERROR_DETAIL,

                                    '$(ScriptErrorList)' as ERROR_LIST,

                                    now() as ERROR_DATE

                                    RESIDENT Data;    

                                   

STORE TEMP2 into ../DATA/TABLES/TEMP2.qvd(qvd);  

This way ScripErrorDetails will keep the Error and when the problem come from unnamed fields the error don't stay in ScripErrorDetails.

Regards

1 Solution

Accepted Solutions
marcus_sommer

It's explained within the help by ERRORMODE that ScriptErrorDetails will be only filled by certain errors most from odbc-driver or databases.

- Marcus

View solution in original post

4 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

This is tricky. You should remember that ScriptError-variables are reset when the next statement is executed.

On the other hand, what exactly should QV tell you about "unnamed fields"?

Peter

Not applicable
Author

Thanks for your help.

I wanted to tell "field not found <A>" sorry.

Only ScriptErrorName and ScriptErrorDetails are empty, ScriptErrorList still have his error

Not applicable
Author

Hi,

Someone know why ScriptErrorDetails get an error when this error is a "Table not found " and when it's "field not found <A>" ScriptErrorDetails get nothing.

These two parts have the same script:

FIRST 1 CONCATENATE(ERROR) LOAD
COUNTRY_CODE,
'$(NbRows)' as NB_ROWS,
'$(ScriptErrorCount)' as ERROR_SEQ_NUMBER,
'$(#ScriptError)' as ERROR_ID,
'$(ScriptError)' as ERROR_NAME,
'$(ScriptErrorDetails)' as ERROR_DETAIL,
'$(ScriptErrorList)' as ERROR_LIST,
now() as ERROR_DATE
resident DM_P2M_COUNTRY;

The only difference this script is under different script with an error I made:

First: "Table not found" - I store a table who doesn't exist

Second:  "field not found <AH>" - I changed a field who doesn't exist

Regards

marcus_sommer

It's explained within the help by ERRORMODE that ScriptErrorDetails will be only filled by certain errors most from odbc-driver or databases.

- Marcus