From 04e1b8c4d7897467a6ad29412786390bac11b42f Mon Sep 17 00:00:00 2001 From: giuseppeM99 Date: Wed, 2 Aug 2017 15:12:18 +0200 Subject: [PATCH] Gotta catch 'em all!!! (#164) * Update get_dialogs * Gotta catch 'em all!!! --- .gitignore | 1 + src/danog/MadelineProto/APIFactory.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 3be7bbee8..8af63c1cf 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,7 @@ token.php *~uploading* session.mad *.madeline +*.madeline.lock enc.tar.xz a web_data.php diff --git a/src/danog/MadelineProto/APIFactory.php b/src/danog/MadelineProto/APIFactory.php index e9896a10d..b12a391ea 100644 --- a/src/danog/MadelineProto/APIFactory.php +++ b/src/danog/MadelineProto/APIFactory.php @@ -143,6 +143,16 @@ class APIFactory return ['error_code' => $e->getCode(), 'error' => $e->getMessage()]; } catch (\danog\MadelineProto\RPCErrorException $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()]; } } }