Skip to content

Commit

Permalink
RxNodeComponent should set exceptions on the context (#326)
Browse files Browse the repository at this point in the history
This allows any thrown exceptions to be handled by the runner.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: #326
  • Loading branch information
dagardner-nv authored May 10, 2023
1 parent a0ab014 commit 59a9474
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/mrc/include/mrc/node/rx_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ class RxNodeComponent : public WritableProvider<InputT>, public WritableAcceptor
// Forward to the writable edge
this->get_writable_edge()->await_write(std::move(message));
},
[this](std::exception_ptr ptr) {
runnable::Context::get_runtime_context().set_exception(std::move(ptr));
},
[this]() {
// On completion, release connections
WritableAcceptor<OutputT>::release_edge_connection();
Expand Down

0 comments on commit 59a9474

Please sign in to comment.