# HG changeset patch # User Tom Fredrik "BFG" Klaussen # Date 1350312667 -7200 # Node ID 4acaab0b02e2852cf23fe7cad73603c28d4d5c36 # Parent 9b490aa11124a1510b2f565526d7e71ae9aa5a39 Catch exception at toplevel of all access pages. diff -r 9b490aa11124 -r 4acaab0b02e2 flag.php --- a/flag.php Fri Oct 12 16:47:25 2012 +0200 +++ b/flag.php Mon Oct 15 16:51:07 2012 +0200 @@ -11,6 +11,11 @@ $scriptCache = ScriptIncludeCache::instance(__FILE__); $scriptCache->includeOnce('Flag.inc'); -$flag = new Flag($scriptCache); -$flag->genPage(); +try { + $flag = new Flag($scriptCache); + $flag->genPage(); +} +catch (Exception $e) { + errorPage($e, StatusCodes::HTTP_INTERNAL_SERVER_ERROR); +} /// @endcond diff -r 9b490aa11124 -r 4acaab0b02e2 index.php --- a/index.php Fri Oct 12 16:47:25 2012 +0200 +++ b/index.php Mon Oct 15 16:51:07 2012 +0200 @@ -23,9 +23,8 @@ } try { -$input = new InputParser(basePath() . "/master.xml", $cache); - -$input->genPage(); + $input = new InputParser(basePath() . "/master.xml", $cache); + $input->genPage(); } catch (Exception $e) { errorPage($e, StatusCodes::HTTP_INTERNAL_SERVER_ERROR); diff -r 9b490aa11124 -r 4acaab0b02e2 sitemap.php --- a/sitemap.php Fri Oct 12 16:47:25 2012 +0200 +++ b/sitemap.php Mon Oct 15 16:51:07 2012 +0200 @@ -11,7 +11,12 @@ $cache = ScriptIncludeCache::instance(__FILE__); $cache->includeOnce('Sitemap.inc', dirname(__FILE__)); -$sitemap = new Sitemap("master.xml"); -$sitemap->genPage(); +try { + $sitemap = new Sitemap("master.xml"); + $sitemap->genPage(); +} +catch (Exception $e) { + errorPage($e, StatusCodes::HTTP_INTERNAL_SERVER_ERROR); +} /// @endcond ?>