Closed boan-jfm closed 6 years ago
When I ask for the getCode() in a SQLException instance, I would expect the database error code (https://www.postgresql.org/docs/9.4/static/errcodes-appendix.html), and not the driver error code.
I think it falls back to this mapping: https://github.com/mindplay-dk/sql/blob/master/src/framework/pdo/PreparedPDOStatement.php#L113 where the PDO object returns two types of error code (SQLSTATE error code & Driver-specific error code).
When I ask for the getCode() in a SQLException instance, I would expect the database error code (https://www.postgresql.org/docs/9.4/static/errcodes-appendix.html), and not the driver error code.
I think it falls back to this mapping: https://github.com/mindplay-dk/sql/blob/master/src/framework/pdo/PreparedPDOStatement.php#L113 where the PDO object returns two types of error code (SQLSTATE error code & Driver-specific error code).