comparison index.php @ 73:947d53f95ccd

Refactor Sitemap into a separate class. Catch all exceptions in index.php and send a 500 error if nothing else catches it. Check response status before submitting to sitemap.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Fri, 12 Oct 2012 01:06:32 +0200
parents 218a58bb2f34
children 4acaab0b02e2
comparison
equal deleted inserted replaced
72:7bc88fe62101 73:947d53f95ccd
20 20
21 if (DEBUG_LEVEL >= VERBOSITY_DEBUG) { 21 if (DEBUG_LEVEL >= VERBOSITY_DEBUG) {
22 var_dump($_SERVER); 22 var_dump($_SERVER);
23 } 23 }
24 24
25 try {
25 $input = new InputParser(basePath() . "/master.xml", $cache); 26 $input = new InputParser(basePath() . "/master.xml", $cache);
26 27
27 $input->genPage(); 28 $input->genPage();
29 }
30 catch (Exception $e) {
31 errorPage($e, StatusCodes::HTTP_INTERNAL_SERVER_ERROR);
32 }
28 /// @endcond 33 /// @endcond
29 34
30 ?> 35 ?>