Handle unhandled exception handler == nullptr in Java (#14221)

This commit is contained in:
Eric Liang 2021-02-19 16:54:41 -08:00 committed by GitHub
parent 5740b2391e
commit 58f8c4b23a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -426,7 +426,11 @@ CoreWorker::CoreWorker(const CoreWorkerOptions &options, const WorkerID &worker_
[this](const RayObject &obj) {
// Run this on the event loop to avoid calling back into the language runtime
// from the middle of user operations.
io_service_.post([this, obj]() { options_.unhandled_exception_handler(obj); });
io_service_.post([this, obj]() {
if (options_.unhandled_exception_handler != nullptr) {
options_.unhandled_exception_handler(obj);
}
});
}));
auto check_node_alive_fn = [this](const NodeID &node_id) {