Update Lua.php (#143)
This commit is contained in:
parent
d8949fb474
commit
ae8955d705
@ -115,7 +115,13 @@ class Lua
|
|||||||
|
|
||||||
public function __call($name, $params)
|
public function __call($name, $params)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
return $this->Lua->{$name}(...$params);
|
return $this->Lua->{$name}(...$params);
|
||||||
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
|
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
|
||||||
|
} catch (\danog\MadelineProto\Exception $e){
|
||||||
|
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __set($name, $value)
|
public function __set($name, $value)
|
||||||
|
Loading…
Reference in New Issue
Block a user