From ef190797272ee079c9fa4ac3837a1acef42cdb5a Mon Sep 17 00:00:00 2001 From: whwyy Date: Sun, 23 Nov 2025 23:11:49 +0800 Subject: [PATCH] ea --- Command.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Command.php b/Command.php index cbb8e52..41234fe 100644 --- a/Command.php +++ b/Command.php @@ -123,6 +123,8 @@ class Command extends Component return $result; } catch (Throwable $throwable) { + $this->getLogger()->failure(throwable($throwable), 'mysql'); + if ($this->isRefresh($throwable)) return $this->search($method); $errorMsg = $throwable->getMessage() . PHP_EOL . ' Sql: ' . $this->sql . '.' . json_encode($this->params); @@ -167,6 +169,8 @@ class Command extends Component return $result == 0 ? $prepare->rowCount() : (int)$result; } catch (Throwable $throwable) { + $this->getLogger()->failure(throwable($throwable), 'mysql'); + if ($this->isRefresh($throwable)) return $this->_prepare(); $errorMsg = $throwable->getMessage() . PHP_EOL . ' Sql: ' . $this->sql . '.' . json_encode($this->params);