protected function handleException(EditorExceptionInterface $exception)
    {
        if ($this->getParameter('kernel.debug')) {
            throw $exception;
        }

        return $this->buildResponse([
            'error' => $exception->getMessage(),
        ]);
    }
protected function handleException(EditorExceptionInterface $exception)
    {
        if ($this->getParameter('kernel.debug')) {
            throw $exception;
        }

        return $this->buildResponse([
            'error' => $exception->getMessage(),
        ]);
    }
protected function handleException ( EditorExceptionInterface $ exception ) { if ( $ this -> getParameter ( 'kernel.debug' ) ) { throw $ exception ; } return $ this -> buildResponse ( [ 'error' => $ exception -> getMessage ( ) , ] ) ; }
Handles editor exception.

@param EditorExceptionInterface $exception

@return Response
Handles editor exception .