1 backdrop_web_test_case.php | protected BackdropTestCase::exceptionHandler(Exception $exception) |
Handle exceptions.
See also
set_exception_handler
File
- core/
modules/ simpletest/ backdrop_web_test_case.php, line 689
Class
- BackdropTestCase
- Base class for Backdrop tests.
Code
protected function exceptionHandler(Exception $exception) {
$backtrace = $exception->getTrace();
// Push on top of the backtrace the call that generated the exception.
array_unshift($backtrace, array(
'line' => $exception->getLine(),
'file' => $exception->getFile(),
));
require_once BACKDROP_ROOT . '/core/includes/errors.inc';
// The exception message is run through check_plain() by _backdrop_decode_exception().
$this->error(t('%type: !message in %function (line %line of %file).', _backdrop_decode_exception($exception)), 'Uncaught exception', _backdrop_get_last_caller($backtrace));
}