- Error message now more verbose

This commit is contained in:
mcndave authored and Dave Mc Nicoll committed 2026-10-22 17:24:04 +00:00
1 parent 25ab845886
commit eb505f4772
1 file changed
+1 -1
+1 -1
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) {