Skip to main content

FlowError

Enum FlowError 

Source
pub enum FlowError {
    Parse(String),
    Analyze(String),
    Compile(String),
    Runtime(String),
    Denied(String),
    Core(Error),
}
Expand description

A failure in one of the Flux-Lang pipeline phases.

Variants§

§

Parse(String)

The compact syntax or JSON AST could not be parsed.

§

Analyze(String)

The analyzer rejected the AST (unknown op, unbound symbol, illegal expression position, invalid name, arity/required-param or scalar type mismatch, unbounded loop, …). Effect authorization is not the analyzer’s job — policy decides allow/deny/approve at dispatch.

§

Compile(String)

The LLM front-end failed to produce a valid AST (after repair attempts).

§

Runtime(String)

A failure while executing a plan.

§

Denied(String)

The host’s safety envelope refused to run an op — a policy / permission-rule / capability-scope / user-approval denial, marked by the host on the dispatch outcome (OpOutcome::denied). Structured (not the in-band error string a failed op surfaces as) so is_fatal can see it: re-attempting a deliberate refusal can never succeed and only re-prompts/re-audits the same denial (L-21).

§

Core(Error)

An error bubbled up from a lower flux layer.

Implementations§

Source§

impl FlowError

Source

pub fn is_fatal(&self) -> bool

Whether this error is fatal — a deliberate refusal (a denied confirm, an op Denied by the host’s safety envelope) or a failed invariant (AssertFailed) — rather than a transient failure. Fatal errors must never be re-attempted or silently absorbed by the reliability wrappers: retry propagates them immediately, and the wrap points (loop’s body re-wrap, the composite-op boundary) preserve their structural identity instead of stringifying them, so an enclosing retry still sees them.

Trait Implementations§

Source§

impl Debug for FlowError

Source§

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

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

impl Display for FlowError

Source§

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

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

impl Error for FlowError

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
Source§

impl From<Error> for FlowError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

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, 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> Same for T

Source§

type Output = T

Should always be Self
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.