<?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 $L00Sw) { $this->errorReportCheck($L00Sw); parent::report($L00Sw); } public function render($WSWFa, Exception $gxXSR) { goto hiXV_; WpXY0: return parent::render($WSWFa, $gxXSR); goto JfC2F; aTC3Q: $RbuaN = $this->getExceptionResponse($gxXSR); goto YAY1v; YAY1v: if (null !== $RbuaN) { return $RbuaN; } goto WpXY0; hiXV_: if ($gxXSR instanceof ModelNotFoundException) { $gxXSR = new NotFoundHttpException($gxXSR->getMessage(), $gxXSR); } goto aTC3Q; JfC2F: } protected function convertExceptionToResponse(Exception $gxXSR) { goto XdNcn; XdNcn: $RbuaN = $this->getExceptionResponse($gxXSR); goto lHSb2; HcP3q: if (config('env.APP_DEBUG', true)) { return parent::convertExceptionToResponse($gxXSR); } goto v_O5b; v_O5b: return response()->view('errors.500', array('exception' => $gxXSR), 500); goto W7YxV; lHSb2: if (null !== $RbuaN) { return $RbuaN; } goto HcP3q; W7YxV: } protected function shouldntReport(\Exception $gxXSR) { return $this->isExceptionIgnore($gxXSR) || parent::shouldntReport($gxXSR); } }