eee
This commit is contained in:
@@ -129,7 +129,9 @@ class MongoDB
|
||||
|
||||
throw new \BadMethodCallException("Method {$name} does not exist on MongoDB Client or Database.");
|
||||
} catch (\Throwable $throwable) {
|
||||
return trigger_print_error(throwable($throwable));
|
||||
\Kiri::getLogger()->json_log($throwable);
|
||||
|
||||
return false;
|
||||
} finally {
|
||||
// MongoDB 连接是持久的,不需要释放
|
||||
$this->pool()->push($this->getName(), $client);
|
||||
@@ -324,7 +326,9 @@ class MongoDB
|
||||
|
||||
return $client;
|
||||
} catch (\Throwable $e) {
|
||||
throw new RedisConnectException(sprintf('MongoDB Connect %s Fail: %s', $uri, $e->getMessage()));
|
||||
\Kiri::getLogger()->json_log($e);
|
||||
|
||||
throw new RedisConnectException(sprintf('MongoDB Connect %s Fail: %s', $uri, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user