sms
sms copied to clipboard
[BUG] 当请求到未知的状态时,无法正常捕捉异常
复现方式:腾讯云短信SDK模式。
- 不传入正确的params参数。(出现message为NULL和其他警告。)传入对象而不是数组
- 当套餐余额不足时(出现code类型错误。)
DriverErrorException文件无法正确捕捉错误。
目前自行修改方式:
declare(strict_types=1); /**
- 这是一个eoms系统
- @link https://www.hyperf.io
- @contact [email protected] */ namespace HyperfExt\Sms\Exceptions;
use Psr\Http\Message\ResponseInterface; use RuntimeException; use Throwable;
class DriverErrorException extends RuntimeException { public $response;
public function __construct(?string $message, $code = null, ResponseInterface $response = null, Throwable $previous = null) { parent::__construct((string) $message, (int) $code, $previous); $this->response = $response; } final public function getResponse(): ResponseInterface { return $this->response; }}