From b0ff129e6f97d8b5af82e2114324252d0d76c57f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 28 Jan 2017 16:34:30 +0100 Subject: [PATCH] gotta catch em all --- src/danog/MadelineProto/PrimeModule.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/danog/MadelineProto/PrimeModule.php b/src/danog/MadelineProto/PrimeModule.php index 2a9c59a9..b4bb5da6 100644 --- a/src/danog/MadelineProto/PrimeModule.php +++ b/src/danog/MadelineProto/PrimeModule.php @@ -92,6 +92,7 @@ class PrimeModule } \danog\MadelineProto\Logger::log(['Trying to use the wolfram alpha factorization module'], \danog\MadelineProto\Logger::VERBOSE); + try { $query = 'Do prime factorization of '.$pqstr; $params = [ 'async' => true, @@ -119,6 +120,8 @@ class PrimeModule if (count($res) === 2) { return $res; } + } catch (Exception $e) { + } \danog\MadelineProto\Logger::log(['Trying to use the native factorization module'], \danog\MadelineProto\Logger::VERBOSE); $res = $this->find_small_multiplier_lopatin((int) $pqstr);