MySQL Forums
Forum List  »  Stored Procedures

Capturing specific error messages within a stored procedure
Posted by: Chadwick Baatz
Date: March 22, 2005 02:41PM

I have a stored procedure using a handler to catch errors occuring as SQLWARNING, NOT FOUND, and SQLEXCEPTION. Basically I want to catch anything that happens and log it to a log table. Is there anyway I can figure out the exact error message or error number from the handler? I've looked into the show errors and show warning statements, but they return an empty set even when an error occurs. Is there some system function like the C API's mysql_error or mysql_errno that I can call from the Stored Procedure?

Thanks in advance

Options: ReplyQuote

Written By
Capturing specific error messages within a stored procedure
March 22, 2005 02:41PM

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.