Page 1 of 1

SQL EXIT HANDLER executed when debugging is stopped ??

Posted: Thu 11 Oct 2007 19:07
by obomysql
When I stop debugging a method it seems the EXIT HANDLER gets executed. I have an exit handler declared that writes information into a log table. This table has a message field (NOT NULL). Every time I stop the debugger, a message shows up with the following content:
Column 'message' can not be null
This message must be related to the EXIT HANDLER I declared for the type SQLEXEPTION. I do not see the program cursor stopping in this line when I stop debugging, but it seems the exit handler gets executed because if I allow null values in my log table this failure does not appear.

Does anyone else see a same behavior?

Posted: Fri 12 Oct 2007 07:49
by Elias
The debugger raises an error to exit stored routine immediately and stop the debugging process. Your specified SQLEXCEPTION in the handler condition, so your handler catches this utility exception. You can fix the problem by specifying concrete error code in the handler condition.