1
0
mirror of https://github.com/beestat/app.git synced 2025-06-03 05:36:51 -04:00

Fixed database error handling for #286

This commit is contained in:
Jon Ziebell 2020-06-23 21:48:33 -04:00
parent 7d246cc6f8
commit 7012c34fd7

View File

@ -374,13 +374,15 @@ final class database extends \mysqli {
]; ];
if($result === false) { if($result === false) {
$error = $this->error;
$this->rollback_transaction(); $this->rollback_transaction();
throw new exception( throw new exception(
'Database query failed.', 'Database query failed.',
1206, 1206,
true, true,
[ [
'database_error' => $this->error, 'database_error' => $error,
'query' => $query 'query' => $query
] ]
); );