EntropyEngine::Core::Concurrency::NodeFailedEvent
EntropyEngine::Core::Concurrency::NodeFailedEvent
Section titled “EntropyEngine::Core::Concurrency::NodeFailedEvent”Uh oh - a node threw an exception. More…
#include <WorkGraphEvents.h>
Inherits from EntropyEngine::Core::Concurrency::WorkGraphEvent
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| NodeFailedEvent(const WorkGraph * g, NodeHandle n, std::exception_ptr ex =nullptr) |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| NodeHandle | node The node that failed. |
| std::exception_ptr | exception What was thrown (may be null). |
Additional inherited members
Section titled “Additional inherited members”Public Functions inherited from EntropyEngine::Core::Concurrency::WorkGraphEvent
| Name | |
|---|---|
| WorkGraphEvent(const WorkGraph * g) |
Public Attributes inherited from EntropyEngine::Core::Concurrency::WorkGraphEvent
| Name | |
|---|---|
| std::chrono::steady_clock::time_point | timestamp When this event was created. |
| const WorkGraph * | graph Which graph emitted this event. |
Detailed Description
Section titled “Detailed Description”struct EntropyEngine::Core::Concurrency::NodeFailedEvent;Uh oh - a node threw an exception.
When a node’s work function throws, this event captures the failure. The exception is preserved as exception_ptr so you can rethrow it for debugging or log the details. Remember: node failure triggers cancellation of all dependent nodes!
eventBus->subscribe<NodeFailedEvent>([](const auto& event) { LOG_ERROR("Node {} failed!", event.node.getData()->name);
if (event.exception) { try { std::rethrow_exception(event.exception); } catch (const std::exception& e) { LOG_ERROR(" Reason: {}", e.what()); } catch (...) { LOG_ERROR(" Reason: Unknown exception"); } }});Public Functions Documentation
Section titled “Public Functions Documentation”function NodeFailedEvent
Section titled “function NodeFailedEvent”inline NodeFailedEvent( const WorkGraph * g, NodeHandle n, std::exception_ptr ex =nullptr)Public Attributes Documentation
Section titled “Public Attributes Documentation”variable node
Section titled “variable node”NodeHandle node;The node that failed.
variable exception
Section titled “variable exception”std::exception_ptr exception;What was thrown (may be null).
Updated on 2026-01-26 at 17:14:35 -0500