public static function render($e)
    {
        $page = PageManager::fetchPageByType('404');
        $previous_exception = Frontend::instance()->getException();

        // No 404 detected, throw default Symphony error page
        if (is_null($page['id'])) {
            parent::render(new SymphonyErrorPage(
                $e->getMessage(),
                __('Page Not Found'),
                'generic',
                array(),
                Page::HTTP_STATUS_NOT_FOUND
            ));

            // Recursive 404
        } elseif (isset($previous_exception)) {
            parent::render(new SymphonyErrorPage(
                __('This error occurred whilst attempting to resolve the 404 page for the original request.') . ' ' . $e->getMessage(),
                __('Page Not Found'),
                'generic',
                array(),
                Page::HTTP_STATUS_NOT_FOUND
            ));

            // Handle 404 page
        } else {
            $url = '/' . PageManager::resolvePagePath($page['id']) . '/';

            Frontend::instance()->setException($e);
            $output = Frontend::instance()->display($url);
            echo $output;

            exit;
        }
    }