- Error message now more verbose

This commit is contained in:
Dave M. 2026-07-14 19:40:54 +00:00
parent 1dcf32e0da
commit 00093b0398

View File

@ -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) {