Exception Handler: Special character in $ErrMessage
Posted: Fri Jan 18, 2013 3:27 am
Hi all,
Want to pass the result of the $ErrMessage from an exception handler to a server job writing the message to a db table. For other reasons the input of this job needs the parameter as an quoted string. However when I use squote(Exception_handler.$ErrMessage) the message is qouted, but seems to contain a special character (appearing in the director log as a newline).
The log:
'Error calling DSAttachJob(JobTestAbort)
(DSOpenJob) Cannot open job JobTestAbort. - not a runnable job JOB'
This causes the job parameter to be populated with the first part only:
'Error calling DSAttachJob(JobTestAbort)
Instead of the complete message. Tried replacing char(10), char(13), trim
but there seems to be something else 'in the middle' ?
i'd probably need a coffee...
William
Want to pass the result of the $ErrMessage from an exception handler to a server job writing the message to a db table. For other reasons the input of this job needs the parameter as an quoted string. However when I use squote(Exception_handler.$ErrMessage) the message is qouted, but seems to contain a special character (appearing in the director log as a newline).
The log:
'Error calling DSAttachJob(JobTestAbort)
(DSOpenJob) Cannot open job JobTestAbort. - not a runnable job JOB'
This causes the job parameter to be populated with the first part only:
'Error calling DSAttachJob(JobTestAbort)
Instead of the complete message. Tried replacing char(10), char(13), trim
but there seems to be something else 'in the middle' ?
i'd probably need a coffee...
William