public function getErrorMessage($exception)
    {
        $application = $this->application;
        $errorHandler = $this->runner;

        // quit if error occured
        $shouldQuit = $application->isError();

        //
        if($application instanceof Application){
            // if request type ist not strict e.g. xml or json consider error config
            if (!$application->isXmlRequest() && !$application->isJsonRequest()) {
                $shouldQuit = $shouldQuit && $application->getConfig(ApplicationInterface::KEY_ERROR, ApplicationInterface::DEFAULT_ERROR);
            }
        }

        $errorHandler->allowQuit($shouldQuit);

        $method = $errorHandler::EXCEPTION_HANDLER;
        ob_start();
        $errorHandler->$method($exception);
        $message = ob_get_clean();

        return $message;
    }