protected function errorPage($message, $status = 500)
    {
        if ($message instanceof \Exception) {
            $strMessage = $this->getTranslator()->trans(
                "Sorry, an error occured: %msg",
                [ '%msg' => $message->getMessage() ]
            );

            Tlog::getInstance()->addError($strMessage.": ".$message->getTraceAsString());

            $message = $strMessage;
        } else {
            Tlog::getInstance()->addError($message);
        }

        return $this->render(
            'general_error',
            array(
                "error_message" => $message
            ),
            $status
        );
    }