2015-08-30 13:22:00 +02:00
|
|
|
<?php
|
|
|
|
|
2015-10-25 06:17:45 +01:00
|
|
|
/**
|
|
|
|
* Pony.fm - A community for pony fan music.
|
2018-04-21 06:25:36 +02:00
|
|
|
* Copyright (C) 2015 Feld0
|
2015-10-25 06:17:45 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2021-02-14 03:34:58 +01:00
|
|
|
namespace App\Exceptions;
|
2015-08-30 13:22:00 +02:00
|
|
|
|
|
|
|
use Exception;
|
2016-09-30 01:56:25 +02:00
|
|
|
use Illuminate\Auth\AuthenticationException;
|
2017-11-28 08:00:11 +01:00
|
|
|
use GrahamCampbell\Exceptions\ExceptionHandler;
|
2015-08-30 13:22:00 +02:00
|
|
|
|
|
|
|
class Handler extends ExceptionHandler
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* A list of the exception types that should not be reported.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $dontReport = [
|
2017-11-28 08:00:11 +01:00
|
|
|
//
|
2015-08-30 13:22:00 +02:00
|
|
|
];
|
|
|
|
|
2017-11-28 08:00:11 +01:00
|
|
|
/**
|
|
|
|
* A list of the inputs that are never flashed for validation exceptions.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $dontFlash = [
|
|
|
|
'password',
|
|
|
|
'password_confirmation',
|
|
|
|
];
|
|
|
|
|
|
|
|
|
2015-08-30 13:22:00 +02:00
|
|
|
/**
|
|
|
|
* Report or log an exception.
|
|
|
|
*
|
|
|
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
|
|
|
*
|
|
|
|
* @param \Exception $e
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function report(Exception $e)
|
|
|
|
{
|
2016-09-30 00:26:31 +02:00
|
|
|
parent::report($e);
|
2015-08-30 13:22:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render an exception into an HTTP response.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Http\Request $request
|
|
|
|
* @param \Exception $e
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function render($request, Exception $e)
|
|
|
|
{
|
|
|
|
return parent::render($request, $e);
|
|
|
|
}
|
|
|
|
}
|