Expand description
Dynamo Error System
This module provides a standardized error type for Dynamo with support for:
- Categorized error types via
ErrorTypeenum - Error chaining via the standard
std::error::Error::source()method - Serialization for network transmission via serde
§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§
- Dynamo
Error - The standardized error type for Dynamo.
- Dynamo
Error Builder - Builder for constructing a
DynamoError.
Enums§
- Backend
Error - Categorizes errors into a fixed set of standard types.
- Error
Type
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.