This commit is contained in:
2025-11-23 23:11:49 +08:00
parent dcee10b77b
commit ef19079727
+4
View File
@@ -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);