Skip to main content

Module error

Module error 

Source
Expand description

Dynamo Error System

This module provides a standardized error type for Dynamo with support for:

§DynamoError

DynamoError is the standardized error type for Dynamo. It can be created directly or converted from any std::error::Error:

use dynamo_runtime::error::{DynamoError, ErrorType};

// Simple error
let err = DynamoError::msg("something failed");

// Typed error with cause
let cause = std::io::Error::other("io error");
let err = DynamoError::builder()
    .error_type(ErrorType::Unknown)
    .message("operation failed")
    .cause(cause)
    .build();

// Convert from any std::error::Error
let std_err = std::io::Error::other("io error");
let dynamo_err = DynamoError::from(Box::new(std_err) as Box<dyn std::error::Error>);

Structs§

DynamoError
The standardized error type for Dynamo.
DynamoErrorBuilder
Builder for constructing a DynamoError.

Enums§

BackendError
Categorizes errors into a fixed set of standard types.
ErrorType

Functions§

match_error_chain
Check whether an error chain contains a specific set of error types while not containing any of the excluded error types.