- 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

@ -50,7 +50,7 @@ trait PdoTrait
} }
catch(\PDOException $pdo) { catch(\PDOException $pdo) {
if ( !str_starts_with($pdo->getMessage(), 'There is no active transaction') ) { if ( !str_starts_with($pdo->getMessage(), 'There is no active transaction') ) {
throw $pdo; throw new \PdoException($pdo->getMessage() . " `$sql` with data:" . json_encode($parameters), (int) $pdo->getCode(), $pdo);
} }
} }
catch (\Throwable $e) { catch (\Throwable $e) {