app/Exceptions/Handler.php
protected function renderDebugXmlHttpException($e)
    {
        // handle our ajax errors
        $data = [
            'message' => $e->getMessage(),
            'trace'   => $e->getTrace(),
        ];

        if ($e instanceof HttpException) {
            return new JsonResponse($data, $e->getStatusCode());
        }

        return new JsonResponse($data, 500);
    }
protected function renderDebugXmlHttpException($e)
    {
        // handle our ajax errors
        $data = [
            'message' => $e->getMessage(),
            'trace'   => $e->getTrace(),
        ];

        if ($e instanceof HttpException) {
            return new JsonResponse($data, $e->getStatusCode());
        }

        return new JsonResponse($data, 500);
    }
protected function renderDebugXmlHttpException ( $ e ) { // handle our ajax errors $ data = [ 'message' => $ e -> getMessage ( ) , 'trace' => $ e -> getTrace ( ) , ] ; if ( $ e instanceof HttpException ) { return new JsonResponse ( $ data , $ e -> getStatusCode ( ) ) ; } return new JsonResponse ( $ data , 500 ) ; }
Renders an exception from ajax requests
Only use this in debug mode.

@param \Exception $e

@return JsonResponse
Renders an exception from ajax requests Only use this in debug mode .