<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace App\Exceptions; use Exception; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use ModStart\Core\Exception\BizException; use ModStart\Core\Exception\ExceptionReportHandleTrait; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Handler extends ExceptionHandler { use ExceptionReportHandleTrait; protected $dontReport = array(HttpException::class, ModelNotFoundException::class, BizException::class); public function report(Exception $DyCvU) { $this->errorReportCheck($DyCvU); parent::report($DyCvU); } public function render($B_aJf, Exception $glMRj) { goto ozkJU; EGB3a: if (null !== $wwriw) { return $wwriw; } goto ZwraD; Dy_Ma: $wwriw = $this->getExceptionResponse($glMRj); goto EGB3a; ZwraD: return parent::render($B_aJf, $glMRj); goto wvBgB; ozkJU: if ($glMRj instanceof ModelNotFoundException) { $glMRj = new NotFoundHttpException($glMRj->getMessage(), $glMRj); } goto Dy_Ma; wvBgB: } protected function convertExceptionToResponse(Exception $glMRj) { goto w4Fym; Ky60z: if (env('APP_DEBUG', true)) { return parent::convertExceptionToResponse($glMRj); } goto Hrx6P; Hrx6P: return response()->view('errors.500', array('exception' => $glMRj), 500); goto FgO0z; w4Fym: $wwriw = $this->getExceptionResponse($glMRj); goto F_YME; F_YME: if (null !== $wwriw) { return $wwriw; } goto Ky60z; FgO0z: } protected function shouldntReport(\Exception $glMRj) { return $this->isExceptionIgnore($glMRj) || parent::shouldntReport($glMRj); } }