|
|
@@ -55,15 +55,16 @@ class Handler extends ExceptionHandler
|
|
|
*/
|
|
|
public function render($request, Throwable $exception)
|
|
|
{
|
|
|
-// if ($exception instanceof HttpException) {
|
|
|
- $code = $exception->getStatusCode();
|
|
|
- Controller::logS('exception',$code,$exception->getTraceAsString().'|| ||'.json_encode($request->all()));
|
|
|
- switch ($code){
|
|
|
- case 419:return response()->view('exception.login');
|
|
|
- case 404:return response()->view('exception.404');
|
|
|
- default: return response()->view('exception.default',compact('code'));
|
|
|
+ if ($exception instanceof HttpException) {
|
|
|
+ $code = $exception->getStatusCode();
|
|
|
+ Controller::logS('exception',$code,$exception->getTraceAsString().'|| ||'.json_encode($request));
|
|
|
+ switch ($code){
|
|
|
+ case 419:return response()->view('exception.login');
|
|
|
+ case 404:return response()->view('exception.404');
|
|
|
+ default: return response()->view('exception.default',compact('code'));
|
|
|
+ }
|
|
|
}
|
|
|
-// }
|
|
|
+ Controller::logS('exception',class_basename($exception),$exception->getTraceAsString().'|| ||'.json_encode($request));
|
|
|
return parent::render($request, $exception);
|
|
|
}
|
|
|
}
|