ZF-3684: Exception error codes are NULL in Zend_Db
const ERR_ALREADY_EXISTS = NULL; const ERR_CANT_MAP = NULL; const ERR_CONSTRAINT = NULL; const ERR_DISCONNECTED = NULL; const ERR_MISMATCH = NULL; const ERR_NO_PERM = NULL; const ERR_NONE = '00000'; const ERR_NOT_FOUND = NULL; const ERR_NOT_IMPLEMENTED = NULL; const ERR_SYNTAX = NULL; const ERR_TRUNCATED = NULL;
Why are all those constants null? Parsing the error message is what this leads to and that is a pretty expensive operation. E.g. I rely on constraints set in the DB (table) on some insert operations and would like to disregard some "errors" returned. Impossible if the error code is NULL.
At least you could pass through the real error codes which the designated backend provides and allow people to match based on that. I am using Zend_Db (with PDO mysql).
I remember I had an issue open about a year or maybe 1.5 years ago describing exactly the same issues. I thought it had been fixed before.
It's only an improvement, but also a major showstopper for me.