Mercurial > SimpleWebPresenter
diff 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 |
line wrap: on
line diff
--- a/index.php Thu Oct 11 23:47:12 2012 +0200 +++ b/index.php Fri Oct 12 01:06:32 2012 +0200 @@ -22,9 +22,14 @@ var_dump($_SERVER); } +try { $input = new InputParser(basePath() . "/master.xml", $cache); $input->genPage(); +} +catch (Exception $e) { + errorPage($e, StatusCodes::HTTP_INTERNAL_SERVER_ERROR); +} /// @endcond ?> \ No newline at end of file
