Skip to content

Commit

Permalink
Merge pull request #31688 from totten/master-test-sql-excp
Browse files Browse the repository at this point in the history
Civi\Test::execute() - Raise exception for SQL error
  • Loading branch information
totten authored Jan 2, 2025
2 parents d2012fa + d247e2b commit 15ea0db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Civi/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ public static function execute($query) {
continue;
}
else {
var_dump($result);
var_dump($pdo->errorInfo());
// die( "Cannot execute $query: " . $pdo->errorInfo() );
throw new \RuntimeException('Cannot execute query: ' . json_encode([$query, $pdo->errorInfo()], JSON_PRETTY_PRINT));
}
}
}
Expand Down

0 comments on commit 15ea0db

Please sign in to comment.