mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
调整异常处理机制
This commit is contained in:
@@ -17,6 +17,12 @@ namespace think;
|
||||
*/
|
||||
class Exception extends \Exception
|
||||
{
|
||||
/**
|
||||
* 系统异常后发送给客户端的HTTP Status
|
||||
* @var integer
|
||||
*/
|
||||
protected $httpStatus = 500;
|
||||
|
||||
/**
|
||||
* 保存异常页面显示的额外Debug数据
|
||||
* @var array
|
||||
@@ -53,4 +59,13 @@ class Exception extends \Exception
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取要发送给客户端的HTTP Status
|
||||
* @return integer HTTP Status
|
||||
*/
|
||||
final public function getHttpStatus()
|
||||
{
|
||||
return $this->httpStatus;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user