[更新]修改基础异常类

This commit is contained in:
Anyon 2018-02-02 19:55:03 +08:00
parent e79157de0c
commit 2c6df0afd2
4 changed files with 67 additions and 1 deletions

View File

@ -21,4 +21,20 @@ namespace WeChat\Exceptions;
*/
class InvalidArgumentException extends \InvalidArgumentException
{
/**
* @var array
*/
public $raw = [];
/**
* InvalidArgumentException constructor.
* @param string $message
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;
}
}

View File

@ -21,4 +21,20 @@ namespace WeChat\Exceptions;
*/
class InvalidDecryptException extends \Exception
{
/**
* @var array
*/
public $raw = [];
/**
* InvalidDecryptException constructor.
* @param string $message
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;
}
}

View File

@ -15,10 +15,27 @@
namespace WeChat\Exceptions;
/**
* 接口请求返回异常
* 返回异常
* Class InvalidResponseException
* @package WeChat
*/
class InvalidResponseException extends \Exception
{
/**
* @var array
*/
public $raw = [];
/**
* InvalidResponseException constructor.
* @param string $message
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;
}
}

View File

@ -22,4 +22,21 @@ namespace WeChat\Exceptions;
class LocalCacheException extends \Exception
{
/**
* @var array
*/
public $raw = [];
/**
* LocalCacheException constructor.
* @param string $message
* @param integer $code
* @param array $raw
*/
public function __construct($message, $code, $raw = [])
{
parent::__construct($message, intval($code));
$this->raw = $raw;
}
}