[ad_1]
You can create a HANDLER
for your exception and you can set settings or variable values as you like:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
SET hasError = 1;
And later you can check the value of hasError
.
You can do something more complex as well in stored procedures:
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
BEGIN
...
END;
[ad_2]