cancel
Showing results for 
Search instead for 
Did you mean: 

HANA Stored Procedure Exception Handling - Storing & Re-Throwing

former_member788839
Discoverer
0 Kudos

Hi Experts,

I need an assistance on the following problem.

I wanted to store an exception into a manually created error log table then rethrow the exception using the following script.

However when an exception is found, the program directly rethrow the exception without storing any record in the error log table.

How do I both store the exception detail in a table & rethrow the exception properly? I hope the example given above is sufficient.

Thanks in advance.

Best regards,

CA

Accepted Solutions (1)

Accepted Solutions (1)

Cocquerel
Active Contributor
0 Kudos

You have to put your handler coding into an Autonomous Transaction

former_member788839
Discoverer
0 Kudos

Thanks for the reply! Works like a charm! Just don't forget to include COMMIT after inserting to the table.

Answers (0)