<?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 $WQHFg) { $this->errorReportCheck($WQHFg); parent::report($WQHFg); } public function render($c9QsX, Exception $nZVwA) { goto TVivk; yZwcd: if (null !== $CU0tN) { return $CU0tN; } goto jOgcq; jOgcq: return parent::render($c9QsX, $nZVwA); goto izaIV; esjB4: $CU0tN = $this->getExceptionResponse($nZVwA); goto yZwcd; TVivk: if ($nZVwA instanceof ModelNotFoundException) { $nZVwA = new NotFoundHttpException($nZVwA->getMessage(), $nZVwA); } goto esjB4; izaIV: } protected function convertExceptionToResponse(Exception $nZVwA) { goto fxu30; foWWF: if (null !== $CU0tN) { return $CU0tN; } goto n__VF; fxu30: $CU0tN = $this->getExceptionResponse($nZVwA); goto foWWF; itrvt: return response()->view('errors.500', array('exception' => $nZVwA), 500); goto VOB3c; n__VF: if (env('APP_DEBUG', true)) { return parent::convertExceptionToResponse($nZVwA); } goto itrvt; VOB3c: } protected function shouldntReport(\Exception $nZVwA) { return $this->isExceptionIgnore($nZVwA) || parent::shouldntReport($nZVwA); } }