Exception Handling

Ivan Smahin ivan_smahin at paradigmasoft.com
Mon Feb 16 02:40:28 CST 2009


Hello Bart,

Friday, February 13, 2009, 5:06:18 PM, you wrote:

> Hi List, Ruslan,


> In an exception block within a stored procedure can I do this:
> begin


> exception
> when 56503 then
>         leave
> when others then
>         print 'Error has occured: procedurename: ' || err_name


> end

> the question is about the err_name; can I use err_name to have  
> description of the exception (ie: ERR_CONSTRAINT_UNIQUE_VIOLATION) ?

> This way we could use the log to correct untrapped exceptions in an SP

Sorry for delay.

         print 'Error has occured: procedurename: ' || Hex(@@LastErrorNumber)




-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list