IcingaObject: die when there was no error handler

This commit is contained in:
Thomas Gelf 2015-06-15 16:36:51 +02:00
parent 91dde44441
commit 828a4a709b
1 changed files with 6 additions and 2 deletions

View File

@ -224,8 +224,12 @@ abstract class IcingaObject extends DbObject
trigger_error($e);
$previousHandler = set_exception_handler(function () {});
restore_error_handler();
call_user_func($previousHandler, $e);
die();
if ($previousHandler !== null) {
call_user_func($previousHandler, $e);
die();
} else {
die($e->getMessage());
}
}
}
}