Piwik\FrontController::generateSafeModeOutput PHP Method

generateSafeModeOutput() private static method

private static generateSafeModeOutput ( $lastError ) : mixed | void
$lastError
return mixed | void
    private static function generateSafeModeOutput($lastError)
    {
        Common::sendResponseCode(500);
        $controller = FrontController::getInstance();
        try {
            $controller->init();
            $message = $controller->dispatch('CorePluginsAdmin', 'safemode', array($lastError));
        } catch (Exception $e) {
            // may fail in safe mode (eg. global.ini.php not found)
            $message = sprintf("Piwik encoutered an error: %s (which lead to: %s)", $lastError['message'], $e->getMessage());
        }
        return $message;
    }