This commit is contained in:
2020-09-03 18:10:28 +08:00
parent 6425b0464d
commit 39f17a1c2e
-10
View File
@@ -278,23 +278,13 @@ class Redis extends Component
*/ */
public function __call($name, $arguments) public function __call($name, $arguments)
{ {
try {
if (method_exists($this, $name)) { if (method_exists($this, $name)) {
$data = $this->{$name}(...$arguments); $data = $this->{$name}(...$arguments);
} else { } else {
$data = $this->proxy()->{$name}(...$arguments); $data = $this->proxy()->{$name}(...$arguments);
} }
} catch (\Throwable $exception) {
$this->error(print_r([
$exception->getMessage(),
$exception->getFile(),
$exception->getLine()
], true));
$data = false;
} finally {
return $data; return $data;
} }
}
/** /**
* 释放连接池 * 释放连接池