MySQL Forums
Forum List  »  Stored Procedures

capturing specific error_code in a generic error HANDLER
Posted by: Amy Bowers
Date: November 11, 2008 01:47PM

I'd like to declare a SQLWARNING handler that captures the specific error. I'm imagining the code would look something like this:

DECLARE CONTINUE HANDLER
FOR SQLWARNING
select concat('your warning code is: ', [actual error code goes here]);

Is there a system variable that stores the last error code? Or some other way to access the error code?

Amy

Options: ReplyQuote


Subject
Views
Written By
Posted
capturing specific error_code in a generic error HANDLER
3243
November 11, 2008 01:47PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.