diff sitemap.php @ 82:4acaab0b02e2

Catch exception at toplevel of all access pages.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Mon, 15 Oct 2012 16:51:07 +0200
parents 1d5166aba2c5
children b9654b9c4a66
line wrap: on
line diff
--- 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
 ?>