Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added Bootstrapper::$errorHandlingCallback to customize the error han…
…dler for exceptions thrown from within a controller or view
  • Loading branch information
gou1 committed Apr 8, 2014
1 parent e5edf13 commit ebe021b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libraries/ManiaLib/Application/Bootstrapper.php
Expand Up @@ -17,6 +17,7 @@ abstract class Bootstrapper

static $errorReporting = E_ALL;
static $errorHandlingClass = '\ManiaLib\Application\ErrorHandling';
static $errorHandlingCallback = '\ManiaLib\Application\ErrorHandling::exceptionHandler';
static $errorHandler = 'exceptionErrorHandler';
static $fatalExceptionHandler = 'fatalExceptionHandler';

Expand Down
1 change: 1 addition & 0 deletions libraries/ManiaLib/Application/Dispatcher.php
Expand Up @@ -83,6 +83,7 @@ function run()
catch(\Exception $e)
{
ErrorHandling::exceptionHandler($e);
call_user_func(Bootstrapper::$errorHandlingCallback, $e);
Response::getInstance()->render();
}
}
Expand Down

1 comment on commit ebe021b

@gou1
Copy link
Member Author

@gou1 gou1 commented on ebe021b Apr 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duh, nab

Please sign in to comment.