static function handle_exception($exception, $call_previous = true)
{
self::$exceptions[] = $exception;
if (Exceptional::$api_key != null) {
$data = new ExceptionalData($exception);
ExceptionalRemote::send_exception($data);
}
// if there's a previous exception handler, we call that as well
if ($call_previous && self::$previous_exception_handler) {
call_user_func(self::$previous_exception_handler, $exception);
}
}