Skip to main content

JunctureError

Struct JunctureError 

Source
pub struct JunctureError { /* private fields */ }
Expand description

Juncture error with backtrace

Implementations§

Source§

impl JunctureError

Source

pub fn graph(msg: impl Into<String>) -> Self

Graph construction error

Source

pub fn execution(msg: impl Into<String>) -> Self

Graph execution error

Source

pub fn checkpoint(msg: impl Into<String>) -> Self

Checkpoint persistence error

Source

pub fn interrupt(msg: impl Into<String>) -> Self

Human-in-the-loop interrupt

Source

pub fn interrupted(index: usize) -> Self

Human-in-the-loop interrupted execution

Source

pub fn subgraph(msg: impl Into<String>) -> Self

Subgraph error

Source

pub fn invalid_update(msg: impl Into<String>) -> Self

Invalid state update

Source

pub fn empty_channel() -> Self

Channel value is empty

Source

pub fn empty_input() -> Self

Graph input is empty

Source

pub fn task_not_found(id: impl Into<String>) -> Self

Task not found

Source

pub fn timeout(msg: impl Into<String>) -> Self

Operation timed out

Source

pub fn recursion_limit(step: usize, limit: usize) -> Self

Recursion limit exceeded

Source

pub const fn backtrace(&self) -> &Backtrace

Access the backtrace for this error

Source

pub const fn code(&self) -> ErrorCode

Get the error code categorizing this error

Source

pub const fn is_graph(&self) -> bool

Source

pub const fn is_execution(&self) -> bool

Source

pub const fn is_checkpoint(&self) -> bool

Source

pub const fn is_interrupt(&self) -> bool

Source

pub const fn is_subgraph(&self) -> bool

Source

pub const fn is_invalid_update(&self) -> bool

Source

pub const fn is_empty_channel(&self) -> bool

Source

pub const fn is_empty_input(&self) -> bool

Source

pub const fn is_task_not_found(&self) -> bool

Source

pub const fn is_timeout(&self) -> bool

Source

pub const fn is_recursion_limit(&self) -> bool

Source

pub fn cancelled() -> Self

Execution was cancelled

Source

pub const fn is_cancelled(&self) -> bool

Check if this is a cancellation error

Source

pub fn multiple_writers(field_index: usize, writers: Vec<String>) -> Self

Multiple writers on a replace channel

Source

pub const fn is_multiple_writers(&self) -> bool

Check if this is a multiple writers error

Source

pub fn task_panicked(msg: impl Into<String>) -> Self

Task panicked during execution

Source

pub const fn is_task_panicked(&self) -> bool

Check if this is a task panic error

Source

pub fn node_timeout(err: NodeTimeoutError) -> Self

Node execution exceeded its timeout

Source

pub const fn is_node_timeout(&self) -> bool

Check if this is a node timeout error

Source

pub fn parent_command(target: impl Into<String>) -> Self

Subgraph-to-parent routing command

Used by nodes inside a subgraph to request routing to a specific node in the parent graph. The subgraph node returns this error as an exception mechanism, which the SubgraphNode wrapper catches and converts to a Command::goto(target).

§Arguments
  • target - Name of the target node in the parent graph
Source

pub const fn is_parent_command(&self) -> bool

Check if this is a parent command routing signal

Returns true when a subgraph node has requested routing to a node in the parent graph.

Source

pub fn parent_command_target(&self) -> Option<&str>

Get the target node name for a parent command

Returns Some(target) when this is a parent command error, containing the name of the target node in the parent graph. Returns None for all other error types.

Source

pub const fn error_code(&self) -> ErrorCode

Get the error code categorizing this error (alias for code())

This method is an alias for code() and exists for compatibility with external code that expects this name.

Source

pub const fn is_graph_recursion_limit(&self) -> bool

Check if this is a graph recursion limit error (alias for is_recursion_limit())

This method is an alias for is_recursion_limit() and exists for compatibility with external code that expects this name.

Source

pub const fn is_invalid_concurrent_update(&self) -> bool

Check if this is an invalid concurrent update error (alias for is_multiple_writers())

This method is an alias for is_multiple_writers() and exists for compatibility with external code that expects this name.

Source

pub const fn is_node_failed(&self) -> bool

Check if this is a node execution failed error

Returns true if this error represents a node execution failure.

Source

pub const fn is_budget_exceeded(&self) -> bool

Check if this is a budget exceeded error

Returns true if this error represents a budget/tokens limit exceeded.

Source

pub const fn is_serialize(&self) -> bool

Check if this is a serialization error

Returns true if this error represents a serialization/deserialization failure.

Trait Implementations§

Source§

impl Debug for JunctureError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for JunctureError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for JunctureError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more