Differential D15669 Diff 37771 src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | switch ($errno) { | ||||
// NOTE: In some versions of MySQL we get a key name back here, but | // NOTE: In some versions of MySQL we get a key name back here, but | ||||
// older versions just give us a key index ("key 2") so it's not | // older versions just give us a key index ("key 2") so it's not | ||||
// portable to parse the key out of the error and attach it to the | // portable to parse the key out of the error and attach it to the | ||||
// exception. | // exception. | ||||
throw new AphrontDuplicateKeyQueryException($message); | throw new AphrontDuplicateKeyQueryException($message); | ||||
case 1044: // Access denied to database | case 1044: // Access denied to database | ||||
case 1142: // Access denied to table | case 1142: // Access denied to table | ||||
case 1143: // Access denied to column | case 1143: // Access denied to column | ||||
case 1227: // Access denied (e.g., no SUPER for SHOW SLAVE STATUS). | |||||
throw new AphrontAccessDeniedQueryException($message); | throw new AphrontAccessDeniedQueryException($message); | ||||
case 1045: // Access denied (auth) | case 1045: // Access denied (auth) | ||||
throw new AphrontInvalidCredentialsQueryException($message); | throw new AphrontInvalidCredentialsQueryException($message); | ||||
case 1146: // No such table | case 1146: // No such table | ||||
case 1049: // No such database | case 1049: // No such database | ||||
case 1054: // Unknown column "..." in field list | case 1054: // Unknown column "..." in field list | ||||
throw new AphrontSchemaQueryException($message); | throw new AphrontSchemaQueryException($message); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |