Tweak a few error handling things.

This commit is contained in:
Taylor Otwell 2014-12-02 17:21:16 -06:00
parent 35b3e8f398
commit 9db97c3285
2 changed files with 17 additions and 1 deletions

View File

@ -5,6 +5,15 @@
class Handler extends ExceptionHandler { class Handler extends ExceptionHandler {
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
'Symfony\Component\HttpKernel\Exception\HttpException'
];
/** /**
* Report or log an exception. * Report or log an exception.
* *
@ -26,8 +35,15 @@ public function report(Exception $e)
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Exception $e) public function render($request, Exception $e)
{
if ($this->isHttpException($e))
{
return $this->renderHttpException($e);
}
else
{ {
return parent::render($request, $e); return parent::render($request, $e);
} }
}
} }