Permalink
Browse files

Catch exceptions that occur on bootstrap

When an exception is thrown on bootstrap (e.g. no connection to backend)
it is now catched within the index.php, since otherwise the exception is
not handled anywhere and shown to the user.
  • Loading branch information...
1 parent dbadac0 commit 36e962162ab2fb3840a43df9b2e799732b2c3c19 @pfrischmuth pfrischmuth committed Jun 12, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 index.php
View
@@ -149,7 +149,12 @@ function class_alias($original, $alias)
class_alias('OntoWiki', 'OntoWiki_Application');
// bootstrap
-$application->bootstrap();
+try {
+ $application->bootstrap();
+} catch (Exception $e) {
+ echo $e->getMessage();
+ return;
+}
$event = new Erfurt_Event('onPostBootstrap');
$event->bootstrap = $application->getBootstrap();

0 comments on commit 36e9621

Please sign in to comment.