Coduo\TuTu\Response\Builder::buildForException PHP Method

buildForException() public method

public buildForException ( Exception $exception ) : Response
$exception Exception
return Symfony\Component\HttpFoundation\Response
    public function buildForException(\Exception $exception)
    {
        $content = sprintf('There was a internal server error with message: %s', $exception->getMessage());
        return new Response($content, 500, ['TuTu-Error' => 'Internal']);
    }