完善框架的异常处理

This commit is contained in:
yunwuxin
2016-05-13 19:05:41 +08:00
parent 529fb50c6e
commit aaa0fd7c9f
11 changed files with 434 additions and 214 deletions

View File

@@ -0,0 +1,35 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
namespace think\exception;
use think\Response;
class HttpResponseException extends \RuntimeException
{
/**
* @var Response
*/
protected $response;
public function __construct(Response $response)
{
$this->response = $response;
}
public function getResponse()
{
return $this->response;
}
}