cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the returned error messages in the Try/Catch block in DS 3.0?

Former Member
0 Kudos

A customer sent me the following questions when he tried to implement custom error handling in DS 3.0. I could only find the function "smtp_to" can return the last few lines of trace or error log file but this is not what he wants. Does anyone know the answers? Thanks!

**************************************************************************************************************

I am trying to implement the Try/Catch for error handling, but I have

hard time to get the return the msg from DI, so I can write it to out

custom log table.

Can you tell me or point me to sample code that can do this, also, can

you tell me which tables capture these info if I want to query it from

DI system tables

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Larry,

In Data Services XI 3.1 (GAd yesterday) we made several enhancements for our Try/Catch blocks. One of them is the additional of functions to get details on the error that was catched :

- error_message() Returns the error message of the caught exception

- error_number() Returns the error number of the caught exception

- error_timestamp() Returns the timestamp of the caught exception.

- error_context() Returns the context of the caught exception. For example, "|Session Datapreview_job|Dataflow debug_DataFlow|Transform Debug"

In previous versions, the only thing you could do was in the mail_to function specify the number of lines you want to include from the error_log, which would send the error_log details in the body of the mail.

Thanks,

Ben.

.

Former Member
0 Kudos

Thanks Ben! It will be a very useful feature.

Larry

Answers (0)