pub struct Error { /* private fields */ }Expand description
Why a run, a compile or a function failed.
Implementations§
Source§impl Error
impl Error
Sourcepub fn service(
code: impl Into<Cow<'static, str>>,
message: impl Into<Cow<'static, str>>,
) -> Self
pub fn service( code: impl Into<Cow<'static, str>>, message: impl Into<Cow<'static, str>>, ) -> Self
An error carrying a function’s own code.
Sourcepub fn budget(message: impl Into<Cow<'static, str>>) -> Self
pub fn budget(message: impl Into<Cow<'static, str>>) -> Self
An error indicating an operation, task, or custom run budget was exceeded.
Sourcepub fn with_retryable(self, yes: bool) -> Self
pub fn with_retryable(self, yes: bool) -> Self
Overrides whether a retry may succeed.
Sourcepub fn with_source(self, source: impl Error + Send + Sync + 'static) -> Self
pub fn with_source(self, source: impl Error + Send + Sync + 'static) -> Self
Attaches the error that caused this one.
Sourcepub fn datalogic_error(&self) -> Option<&Error>
pub fn datalogic_error(&self) -> Option<&Error>
The underlying datalogic_rs::Error, when this error came from
expression compilation or evaluation.
Sourcepub fn with_expr_cause(self, cause: ExprCause) -> Self
pub fn with_expr_cause(self, cause: ExprCause) -> Self
Attaches structured expression diagnostics to this error.
Sourcepub fn expr_cause(&self) -> Option<&ExprCause>
pub fn expr_cause(&self) -> Option<&ExprCause>
Structured expression diagnostics, when this error came from an expression or a budget check.
Sourcepub fn with_site(self, site: ErrorSite) -> Self
pub fn with_site(self, site: ErrorSite) -> Self
Attaches the workflow site where this error happened.
Sourcepub fn site(&self) -> Option<&ErrorSite>
pub fn site(&self) -> Option<&ErrorSite>
Where in the workflow this error happened, when known.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
May a retry succeed? A timeout says yes unless told otherwise; everything else says no.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<&Error> for ErrorRecord
impl From<&Error> for ErrorRecord
Source§impl Serialize for Error
Writes the error as {"code", "message", "retryable"}: Error::code,
Error::message and Error::is_retryable, in that order.
impl Serialize for Error
Writes the error as {"code", "message", "retryable"}: Error::code,
Error::message and Error::is_retryable, in that order.