static function fatalExceptionHandler(\Exception $exception)
    {
        throw $exception;

        file_put_contents(MANIALIB_APP_PATH . 'fatal-error.log', print_r($exception, true),
            FILE_APPEND);
        if (array_key_exists('HTTP_USER_AGENT', $_SERVER) && $_SERVER['HTTP_USER_AGENT'] == 'GameBox') {
            echo '<manialink><timeout>0</timeout><label text="Fatal error." /></manialink>';
        } else {
            echo '<h1>Oops</h1>';
            echo '<p>An error occured. Please try again later.</p>';
            echo '<hr />';
            if (\ManiaLib\Application\Config::getInstance()->debug) {
                var_dump($exception);
            }
        }
    }