mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 19:41:07 +03:30
feat: upgrade laravel version from 6 to 7
This commit is contained in:
+15
-11
@@ -2,8 +2,10 @@
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
@@ -29,27 +31,29 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @param Throwable $throwable
|
||||
* @return void
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
public function report(Throwable $throwable)
|
||||
{
|
||||
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
||||
app('sentry')->captureException($exception);
|
||||
if (app()->bound('sentry') && $this->shouldReport($throwable)) {
|
||||
app('sentry')->captureException($throwable);
|
||||
}
|
||||
|
||||
parent::report($exception);
|
||||
parent::report($throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $exception
|
||||
* @return \Illuminate\Http\Response
|
||||
* @param Request $request
|
||||
* @param Throwable $throwable
|
||||
* @return Response
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
public function render($request, Throwable $throwable): Response
|
||||
{
|
||||
return parent::render($request, $exception);
|
||||
return parent::render($request, $throwable);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user