Skip to main content

OperationError

Enum OperationError 

Source
pub enum OperationError {
Show 19 variants ReferenceNotFound { reference: String, }, InvalidTemplatePart, ParameterResolutionFailed { parameter: String, reason: String, }, UndeclaredInput { operation: &'static str, input: String, }, UndeclaredOutput { operation: &'static str, output: String, }, UndeclaredDerivedOutput { operation: &'static str, input: String, }, IterSourceNotFound { iter_name: String, source_ref: String, }, IterSourceTypeMismatch { iter_name: String, source_ref: String, expected: &'static str, }, Iteration { iter_name: String, index: String, depth: usize, source: Box<OperationError>, }, AccessError(AccessError), StoreError(StoreError), MissingParameters { name: String, }, HookAbort { hook: String, reason: String, }, Cancelled, ThreadPanic, ExtensionNotFound { operation: String, extension: String, }, GuardTypeMismatch { guard_name: String, reference: String, }, Guard { guard_name: String, source: Box<OperationError>, }, Custom { operation: String, message: String, },
}
Expand description

Errors produced while executing a running pipeline.

Returned by Pipeline::wait when the worker thread reports failure, and surfaced through OperationError variants in custom operations. Iteration and guard failures wrap the underlying cause in the Iteration and Guard variants so the trace preserves the scope in which the failure occurred.

Variants§

§

ReferenceNotFound

Parameter resolution tried to look up a dotted store path that did not exist at runtime.

Fields

§reference: String

The dotted store path that failed to resolve.

§

InvalidTemplatePart

A Param::Template contained a part that resolved to an array or map instead of a scalar.

§

ParameterResolutionFailed

Resolving a parameter into the runtime store failed — typically because the target key was already occupied.

Fields

§parameter: String

The parameter name being resolved.

§reason: String

Human-readable explanation from the underlying store error.

§

UndeclaredInput

A custom operation called Context::input with a name that was not declared in its OperationMetadata.

Fields

§operation: &'static str

The operation name from its metadata.

§input: String

The undeclared input name that was requested.

§

UndeclaredOutput

A custom operation called Context::set_static_output with a name not present as a NameSpec::Static output in its metadata.

Fields

§operation: &'static str

The operation name from its metadata.

§output: String

The undeclared static output name.

§

UndeclaredDerivedOutput

A custom operation called Context::set_derived_output with an input name not referenced by any derived output in its metadata.

Fields

§operation: &'static str

The operation name from its metadata.

§input: String

The input name the derived output should have come from.

§

IterSourceNotFound

An iteration node resolved its IterSource reference to nothing at runtime.

Fields

§iter_name: String

The iteration node’s name.

§source_ref: String

The store path that failed to resolve.

§

IterSourceTypeMismatch

An iteration source resolved to an entry of the wrong shape — an array was expected but a map (or scalar) was found, or vice versa.

Fields

§iter_name: String

The iteration node’s name.

§source_ref: String

The store path whose entry had the wrong shape.

§expected: &'static str

The shape the iteration expected ("array" or "map").

§

Iteration

A step inside an iteration body failed. Wraps the underlying error so the outer cause includes the iteration name, current index/key, and nesting depth.

Fields

§iter_name: String

The enclosing iteration’s name.

§index: String

The current index or key as rendered by IterIndex::fmt.

§depth: usize

Nesting depth of the iteration (outermost is 0).

§source: Box<OperationError>

The underlying error from the inner step.

§

AccessError(AccessError)

A traversal of a StoreEntry failed.

§

StoreError(StoreError)

A Store operation failed at runtime.

§

MissingParameters

The runner tried to look up the parameters for a step or return block that was never recorded at draft time — this indicates a bug in the caller and is effectively unreachable through normal construction APIs.

Fields

§name: String

The missing step or return-block name.

§

HookAbort

A hook interceptor returned HookAction::Abort.

Fields

§hook: String

The hook that aborted the pipeline.

§reason: String

The reason returned by the interceptor.

§

Cancelled

Pipeline::cancel was observed between steps and the worker exited early.

§

ThreadPanic

The worker thread panicked. Pipeline::wait turns the panic into this variant rather than unwinding into the caller.

§

ExtensionNotFound

Context::extension could not find the requested extension — either the operation did not declare it, or no extension was registered under that name and type.

Fields

§operation: String

The operation requesting the extension.

§extension: String

The extension name that could not be resolved.

§

GuardTypeMismatch

A GuardSource resolved to an entry that was not a Value::Boolean.

Fields

§guard_name: String

The guard node’s name.

§reference: String

The store path whose entry was not a boolean.

§

Guard

A step inside a guard body failed. Wraps the underlying error so the outer cause includes the guard name.

Fields

§guard_name: String

The enclosing guard’s name.

§source: Box<OperationError>

The underlying error from the inner step.

§

Custom

A custom operation emitted an ad-hoc error via Context::error or the op_error! macro.

Fields

§operation: String

The operation name (from metadata) that emitted the error.

§message: String

The operation-supplied message.

Trait Implementations§

Source§

impl Debug for OperationError

Source§

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

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

impl Display for OperationError

Source§

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

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

impl Error for OperationError

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<AccessError> for OperationError

Source§

fn from(source: AccessError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreError> for OperationError

Source§

fn from(source: StoreError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for OperationError

Source§

fn eq(&self, other: &OperationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OperationError

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> 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.