Symfony\Component\HttpKernel\Exception\FlattenException::getTrace PHP Method

getTrace() public method

public getTrace ( )
    public function getTrace()
    {
        return $this->trace;
    }

Usage Example

 /**
  * Converts an Exception to a Response.
  *
  * @param Request $request The request
  * @param FlattenException $exception A FlattenException instance
  * @param DebugLoggerInterface $logger A DebugLoggerInterface instance
  *
  * @param string $_format
  * @return JsonResponse
  */
 public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null, $_format = 'html')
 {
     $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1));
     $wrapper = new ExceptionWrapper();
     $wrapper->setCode($exception->getCode());
     $wrapper->setMessage($exception->getMessage());
     $wrapper->setStatusCode($exception->getStatusCode());
     $wrapper->setTrace($this->debug ? $exception->getTrace() : array());
     return $wrapper->getResponse();
 }