Files
spa-api/app/Exceptions/Handler.php

50 lines
938 B
PHP
Raw Normal View History

2014-11-18 22:48:38 -06:00
<?php namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler {
2014-12-02 17:21:16 -06:00
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
'Symfony\Component\HttpKernel\Exception\HttpException'
];
2014-11-18 22:48:38 -06:00
/**
* Report or log an exception.
*
2014-11-19 21:16:59 -06:00
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
2014-11-19 20:00:42 -06:00
*
2014-11-18 22:48:38 -06:00
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
{
return parent::report($e);
}
/**
* Render an exception into a response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
2014-12-02 17:21:16 -06:00
if ($this->isHttpException($e))
{
return $this->renderHttpException($e);
}
else
{
return parent::render($request, $e);
}
2014-11-18 22:48:38 -06:00
}
}