NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::NodeFailureError Class Reference

Fail a node with an author code. More...

#include <types.h>

Inheritance diagram for neograph::graph::NodeFailureError:
[legend]

Public Member Functions

const std::string & code () const noexcept
 The author code; empty when the failure carries none (NG.TaskFailed).
 

Protected Member Functions

 NodeFailureError (std::string what, std::string code, std::string public_message, std::optional< bool > retryable)
 For bindings that translate a foreign error: what() keeps that error's text.
 

Detailed Description

Fail a node with an author code.

throw NodeFailureError("app.compile_error", "the patch does not compile",
false); // never retry this
Fail a node with an author code.
Definition types.h:466

The code must be an author code (is_author_failure_code()); otherwise the constructor throws std::invalid_argument. A retryable of false stops the retry loop. public_message is the only text a failure record may carry.

Definition at line 466 of file types.h.

Constructor & Destructor Documentation

◆ NodeFailureError()

neograph::graph::NodeFailureError::NodeFailureError ( std::string  what,
std::string  code,
std::string  public_message,
std::optional< bool >  retryable 
)
inlineprotected

For bindings that translate a foreign error: what() keeps that error's text.

code must be empty or an author code.

Definition at line 480 of file types.h.


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