提交 20f03952 编写于 作者: O overtrue

Fix exception handle. #90

上级 e23f1439
......@@ -12,7 +12,6 @@
namespace Overtrue\EasySms;
use Overtrue\EasySms\Contracts\MessageInterface;
use Overtrue\EasySms\Exceptions\GatewayErrorException;
use Overtrue\EasySms\Exceptions\NoGatewayAvailableException;
use Overtrue\EasySms\Support\Config;
......@@ -78,13 +77,16 @@ class Messenger
$isSuccessful = true;
break;
} catch (GatewayErrorException $e) {
} catch (\Throwable $e) {
$results[$gateway] = [
'status' => self::STATUS_FAILURE,
'exception' => $e,
];
} catch (\Exception $e) {
$results[$gateway] = [
'status' => self::STATUS_FAILURE,
'exception' => $e,
];
continue;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册