<?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 $y0N3g) { $this->errorReportCheck($y0N3g); parent::report($y0N3g); } public function render($SbBGi, Exception $sdrUG) { goto THCFD; THCFD: if ($sdrUG instanceof ModelNotFoundException) { $sdrUG = new NotFoundHttpException($sdrUG->getMessage(), $sdrUG); } goto ZTZhP; rFdY1: return parent::render($SbBGi, $sdrUG); goto lGMu7; kzceM: if (null !== $wYM0k) { return $wYM0k; } goto rFdY1; ZTZhP: $wYM0k = $this->getExceptionResponse($sdrUG); goto kzceM; lGMu7: } protected function convertExceptionToResponse(Exception $sdrUG) { goto eX1y7; W1aL4: return response()->view('errors.500', array('exception' => $sdrUG), 500); goto Jdk9n; eX1y7: $wYM0k = $this->getExceptionResponse($sdrUG); goto G3LTb; G3LTb: if (null !== $wYM0k) { return $wYM0k; } goto UPVgr; UPVgr: if (config('env.APP_DEBUG', true)) { return parent::convertExceptionToResponse($sdrUG); } goto W1aL4; Jdk9n: } protected function shouldntReport(\Exception $sdrUG) { return $this->isExceptionIgnore($sdrUG) || parent::shouldntReport($sdrUG); } }