NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::NodeInterrupt Class Reference

Exception thrown from inside a node to trigger a dynamic breakpoint. More...

#include <types.h>

Inherits std::runtime_error.

Public Member Functions

 NodeInterrupt (const std::string &reason)
 Construct a NodeInterrupt with a reason message.
 
const std::string & reason () const
 Get the interrupt reason.
 

Detailed Description

Exception thrown from inside a node to trigger a dynamic breakpoint.

When a node throws NodeInterrupt, the graph engine saves a checkpoint and pauses execution, allowing Human-in-the-Loop (HITL) intervention. Execution can be resumed with GraphEngine::resume().

throw NodeInterrupt("Need human approval for this action");
Exception thrown from inside a node to trigger a dynamic breakpoint.
Definition types.h:101

Definition at line 101 of file types.h.

Constructor & Destructor Documentation

◆ NodeInterrupt()

neograph::graph::NodeInterrupt::NodeInterrupt ( const std::string &  reason)
inlineexplicit

Construct a NodeInterrupt with a reason message.

Parameters
reasonHuman-readable explanation of why the interrupt was triggered.

Definition at line 105 of file types.h.

Member Function Documentation

◆ reason()

const std::string & neograph::graph::NodeInterrupt::reason ( ) const
inline

Get the interrupt reason.

Returns
The reason string provided at construction.

Definition at line 110 of file types.h.


The documentation for this class was generated from the following file: