March 2006
Intermediate to advanced
640 pages
17h 8m
English
EXC-03: Be consistent in your use of SQLSTATE and MySQL error codes in exception handlers
You often have the choice between a MySQL error code and an
ANSI-standard SQLSTATE code
when creating your exception handler. Be as consistent as possible
in your choice between the two. In some cases, an explicit
SQLSTATE code might not be
available for the error you are trying to catch, and you will want
to use a MySQL error code. Unless portability is your primary
concern—and in reality, this will rarely be the case—we recommend
that you use MySQL error codes exclusively in your stored
programs.