1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 07:14:39 +01:00

catch all the exception (#150)

This commit is contained in:
giuseppeM99 2017-07-08 23:37:30 +02:00 committed by Daniil Gentili
parent b786f3b544
commit f8ba74dd35

View File

@ -127,6 +127,16 @@ class Lua
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
} catch (\danog\MadelineProto\Exception $e) {
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
} catch (\danog\MadelineProto\TL\Exception $e) {
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
} catch (\danog\MadelineProto\NothingInTheSocketException $e) {
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
} catch (\danog\MadelineProto\PTSException $e) {
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
} catch (\danog\MadelineProto\SecurityException $e) {
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
} catch (\danog\MadelineProto\TL\Conversion\Exception $e) {
return ['error_code' => $e->getCode(), 'error' => $e->getMessage()];
}
}