Prado\Exceptions\TErrorHandler::handleRecursiveError PHP Méthode

handleRecursiveError() protected méthode

THttpException and errors happened when the application is in Debug mode will be displayed to the client user. Error is displayed without using existing template to prevent further errors.
protected handleRecursiveError ( $exception )
    protected function handleRecursiveError($exception)
    {
        if ($this->getApplication()->getMode() === TApplicationMode::Debug) {
            echo "<html><head><title>Recursive Error</title></head>\n";
            echo "<body><h1>Recursive Error</h1>\n";
            echo "<pre>" . $exception->__toString() . "</pre>\n";
            echo "</body></html>";
        } else {
            error_log("Error happened while processing an existing error:\n" . $exception->__toString());
            header('HTTP/1.0 500 Internal Error');
        }
    }