<?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 $vw7Fs) { $this->errorReportCheck($vw7Fs); parent::report($vw7Fs); } public function render($q053T, Exception $HVphP) { goto q4Az1; q4Az1: if ($HVphP instanceof ModelNotFoundException) { $HVphP = new NotFoundHttpException($HVphP->getMessage(), $HVphP); } goto EoWCk; S0TLe: return parent::render($q053T, $HVphP); goto a5srV; KtnjZ: if (null !== $fjTOY) { return $fjTOY; } goto S0TLe; EoWCk: $fjTOY = $this->getExceptionResponse($HVphP); goto KtnjZ; a5srV: } protected function convertExceptionToResponse(Exception $HVphP) { goto QjD8e; VngPp: if (null !== $fjTOY) { return $fjTOY; } goto XZJX4; scu9m: return response()->view('errors.500', array('exception' => $HVphP), 500); goto kasbl; QjD8e: $fjTOY = $this->getExceptionResponse($HVphP); goto VngPp; XZJX4: if (env('APP_DEBUG', true)) { return parent::convertExceptionToResponse($HVphP); } goto scu9m; kasbl: } protected function shouldntReport(\Exception $HVphP) { return $this->isExceptionIgnore($HVphP) || parent::shouldntReport($HVphP); } }