Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
It's explained within the help by ERRORMODE that ScriptErrorDetails will be only filled by certain errors most from odbc-driver or databases.
- Marcus
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
Thanks for your help.
I wanted to tell "field not found <A>" sorry.
Only ScriptErrorName and ScriptErrorDetails are empty, ScriptErrorList still have his error
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
It's explained within the help by ERRORMODE that ScriptErrorDetails will be only filled by certain errors most from odbc-driver or databases.
- Marcus