eee
This commit is contained in:
+10
-6
@@ -123,13 +123,15 @@ class Command extends Component
|
||||
|
||||
return $result;
|
||||
} catch (Throwable $throwable) {
|
||||
$this->getLogger()->failure(throwable($throwable), 'mysql');
|
||||
$this->getLogger()->json_log($throwable);
|
||||
|
||||
if ($this->isRefresh($throwable)) return $this->search($method);
|
||||
if ($this->isRefresh($throwable)) {
|
||||
return $this->search($method);
|
||||
}
|
||||
|
||||
$errorMsg = $throwable->getMessage() . PHP_EOL . ' Sql: ' . $this->sql . '.' . json_encode($this->params);
|
||||
|
||||
return $this->getLogger()->failure($errorMsg . PHP_EOL, 'mysql');
|
||||
return $this->getLogger()->logCategory($errorMsg . PHP_EOL, 'mysql');
|
||||
} finally {
|
||||
$this->connection->release($client);
|
||||
}
|
||||
@@ -169,13 +171,15 @@ class Command extends Component
|
||||
|
||||
return $result == 0 ? $prepare->rowCount() : (int)$result;
|
||||
} catch (Throwable $throwable) {
|
||||
$this->getLogger()->failure(throwable($throwable), 'mysql');
|
||||
$this->getLogger()->json_log($throwable);
|
||||
|
||||
if ($this->isRefresh($throwable)) return $this->_prepare();
|
||||
if ($this->isRefresh($throwable)) {
|
||||
return $this->_prepare();
|
||||
}
|
||||
|
||||
$errorMsg = $throwable->getMessage() . PHP_EOL . ' Sql: ' . $this->sql . '.' . json_encode($this->params);
|
||||
|
||||
return $this->getLogger()->failure($errorMsg . PHP_EOL, 'mysql');
|
||||
return $this->getLogger()->logCategory($errorMsg . PHP_EOL, 'mysql');
|
||||
} finally {
|
||||
$this->connection->release($client);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user