pub enum FlowrsError {
NodeExecution(String),
WorkflowExecution(String),
NodeNotFound(String),
NoTransitionDefined(String),
SerializationError(String),
DeserializationError(String),
JoinError(String),
WorkflowCycleDetected,
WorkflowDefinitionError(String),
BatchProcessingError(String),
UnexpectedOutcome(String),
Other(String),
}
Expand description
All possible errors that can occur in the flowrs framework
Variants§
NodeExecution(String)
Error related to node execution
WorkflowExecution(String)
Error related to workflow execution
NodeNotFound(String)
Error when a node is not found in the workflow
NoTransitionDefined(String)
Error when an action transition is not defined
SerializationError(String)
Error during serialization
DeserializationError(String)
Error during deserialization
JoinError(String)
Error during async task joining
WorkflowCycleDetected
A cycle was detected in the workflow
WorkflowDefinitionError(String)
Error in the workflow definition
BatchProcessingError(String)
Error during batch processing
UnexpectedOutcome(String)
Node returned an unexpected outcome
Other(String)
Other generic errors
Implementations§
Source§impl FlowrsError
impl FlowrsError
Sourcepub fn node_execution(node_id: impl Display, message: impl Display) -> Self
pub fn node_execution(node_id: impl Display, message: impl Display) -> Self
Create a new node execution error
Sourcepub fn batch_processing(
message: impl Display,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn batch_processing( message: impl Display, source: Box<dyn Error + Send + Sync>, ) -> Self
Create a new batch processing error
Sourcepub fn unexpected_outcome(message: impl Display) -> Self
pub fn unexpected_outcome(message: impl Display) -> Self
Create a new unexpected outcome error
Sourcepub fn node_not_found(node_id: impl Display) -> Self
pub fn node_not_found(node_id: impl Display) -> Self
Create a new node not found error
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Check if this error is a timeout error
Trait Implementations§
Source§impl Clone for FlowrsError
impl Clone for FlowrsError
Source§fn clone(&self) -> FlowrsError
fn clone(&self) -> FlowrsError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FlowrsError
impl Debug for FlowrsError
Source§impl Display for FlowrsError
impl Display for FlowrsError
Source§impl Error for FlowrsError
impl Error for FlowrsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<FlowrsError> for WorkflowError
impl From<FlowrsError> for WorkflowError
Source§fn from(source: FlowrsError) -> Self
fn from(source: FlowrsError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FlowrsError
impl RefUnwindSafe for FlowrsError
impl Send for FlowrsError
impl Sync for FlowrsError
impl Unpin for FlowrsError
impl UnwindSafe for FlowrsError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more