Qual: Les codes erreurs des requetes est remplac par l'quivalent gnrique, ce qui permet compatibilit des gestions d'erreurs entre mysql et pgsql.

This commit is contained in:
Laurent Destailleur
2005-02-15 22:13:41 +00:00
parent 18834d28c6
commit 6eeda3819b
6 changed files with 48 additions and 34 deletions

View File

@@ -465,7 +465,7 @@ class DoliDb
$error_regexps = array(
'/(Table does not exist\.|Relation [\"\'].*[\"\'] does not exist|sequence does not exist|class ".+" not found)$/' => DB_ERROR_NOSUCHTABLE,
'/table [\"\'].*[\"\'] does not exist/' => DB_ERROR_NOSUCHTABLE,
'/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/' => DB_ERROR_ALREADY_EXISTS,
'/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/' => DB_ERROR_RECORD_ALREADY_EXISTS,
'/divide by zero$/' => DB_ERROR_DIVZERO,
'/pg_atoi: error in .*: can\'t parse /' => DB_ERROR_INVALID_NUMBER,
'/ttribute [\"\'].*[\"\'] not found$|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/' => DB_ERROR_NOSUCHFIELD,