Tweak a few error handling things.
This commit is contained in:
@@ -5,6 +5,15 @@ use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|||||||
|
|
||||||
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.
|
||||||
*
|
*
|
||||||
@@ -27,7 +36,14 @@ class Handler extends ExceptionHandler {
|
|||||||
*/
|
*/
|
||||||
public function render($request, Exception $e)
|
public function render($request, Exception $e)
|
||||||
{
|
{
|
||||||
return parent::render($request, $e);
|
if ($this->isHttpException($e))
|
||||||
|
{
|
||||||
|
return $this->renderHttpException($e);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return parent::render($request, $e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user