@@ -1654,8 +1654,8 @@ public function deleteDocument(string $collection, string $id): bool
16541654 $ name = $ this ->filter ($ collection );
16551655
16561656 $ sql = "
1657- DELETE FROM {$ this ->getSQLTable ($ name )}
1658- WHERE _uid = :_uid
1657+ DELETE FROM {$ this ->getSQLTable ($ name )}
1658+ WHERE _uid = :_uid
16591659 " ;
16601660
16611661 if ($ this ->sharedTables ) {
@@ -2394,27 +2394,27 @@ protected function processException(PDOException $e): \Exception
23942394 {
23952395 // Timeout
23962396 if ($ e ->getCode () === '70100 ' && isset ($ e ->errorInfo [1 ]) && $ e ->errorInfo [1 ] === 1969 ) {
2397- return new TimeoutException ($ e -> getMessage () , $ e ->getCode (), $ e );
2397+ return new TimeoutException (' Query timed out ' , $ e ->getCode (), $ e );
23982398 }
23992399
24002400 // Duplicate table
24012401 if ($ e ->getCode () === '42S01 ' && isset ($ e ->errorInfo [1 ]) && $ e ->errorInfo [1 ] === 1050 ) {
2402- return new DuplicateException ($ e -> getMessage () , $ e ->getCode (), $ e );
2402+ return new DuplicateException (' Collection already exists ' , $ e ->getCode (), $ e );
24032403 }
24042404
24052405 // Duplicate column
24062406 if ($ e ->getCode () === '42S21 ' && isset ($ e ->errorInfo [1 ]) && $ e ->errorInfo [1 ] === 1060 ) {
2407- return new DuplicateException ($ e -> getMessage () , $ e ->getCode (), $ e );
2407+ return new DuplicateException (' Attribute already exists ' , $ e ->getCode (), $ e );
24082408 }
24092409
24102410 // Duplicate index
24112411 if ($ e ->getCode () === '42000 ' && isset ($ e ->errorInfo [1 ]) && $ e ->errorInfo [1 ] === 1061 ) {
2412- return new DuplicateException ($ e -> getMessage () , $ e ->getCode (), $ e );
2412+ return new DuplicateException (' Index already exists ' , $ e ->getCode (), $ e );
24132413 }
24142414
24152415 // Duplicate row
24162416 if ($ e ->getCode () === '23000 ' && isset ($ e ->errorInfo [1 ]) && $ e ->errorInfo [1 ] === 1062 ) {
2417- return new DuplicateException ($ e -> getMessage () , $ e ->getCode (), $ e );
2417+ return new DuplicateException (' Document already exists ' , $ e ->getCode (), $ e );
24182418 }
24192419
24202420 // Data is too big for column resize
@@ -2425,7 +2425,7 @@ protected function processException(PDOException $e): \Exception
24252425
24262426 // Unknown database
24272427 if ($ e ->getCode () === '42000 ' && isset ($ e ->errorInfo [1 ]) && $ e ->errorInfo [1 ] === 1049 ) {
2428- return new NotFoundException ($ e -> getMessage () , $ e ->getCode (), $ e );
2428+ return new NotFoundException (' Database not found ' , $ e ->getCode (), $ e );
24292429 }
24302430
24312431 return $ e ;
0 commit comments