awsipranges/core/errors.rs
1/*-------------------------------------------------------------------------------------------------
2 Errors and Results
3-------------------------------------------------------------------------------------------------*/
4
5// TODO: Add descriptive error messages and handling for the various errors that can occur in the
6// crate.
7
8// Error type alias used throughout the crate.
9pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
10
11// Result type alias used throughout the crate.
12pub type Result<T> = std::result::Result<T, Error>;
13
14/*--------------------------------------------------------------------------------------
15 Log Error Function
16--------------------------------------------------------------------------------------*/
17
18#[cfg(test)]
19pub(crate) fn log_error(error: &Error) {
20 log::error!("{}", error);
21}