From 00093b0398ef71b12b881d2123c092f5bebfe167 Mon Sep 17 00:00:00 2001 From: Dave M Date: Tue, 14 Jul 2026 19:40:54 +0000 Subject: [PATCH] - Error message now more verbose --- src/Pdo/PdoTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pdo/PdoTrait.php b/src/Pdo/PdoTrait.php index 376bcbd..1c56c92 100644 --- a/src/Pdo/PdoTrait.php +++ b/src/Pdo/PdoTrait.php @@ -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) {