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:
parent
7d246cc6f8
commit
7012c34fd7
@ -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
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user