- Error message now more verbose
This commit is contained in:
parent
1dcf32e0da
commit
00093b0398
@ -49,8 +49,8 @@ trait PdoTrait
|
||||
}
|
||||
}
|
||||
catch(\PDOException $pdo) {
|
||||
if (!str_starts_with($pdo->getMessage(), 'There is no active transaction')) {
|
||||
throw $pdo;
|
||||
if ( !str_starts_with($pdo->getMessage(), 'There is no active transaction') ) {
|
||||
throw new \PdoException($pdo->getMessage() . " `$sql` with data:" . json_encode($parameters), (int) $pdo->getCode(), $pdo);
|
||||
}
|
||||
}
|
||||
catch (\Throwable $e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user