commit
This commit is contained in:
20
r/data-transfer/src/error.rs
Normal file
20
r/data-transfer/src/error.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
/// Custom error types for the application
|
||||
/// Uses thiserror for ergonomic error definitions
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum DataTransferError {
|
||||
#[error("Configuration error: {0}")]
|
||||
ConfigError(String),
|
||||
|
||||
#[error("Command execution failed: {0}")]
|
||||
CommandError(String),
|
||||
|
||||
#[error("I/O error: {0}")]
|
||||
IoError(#[from] std::io::Error),
|
||||
|
||||
#[error("Unknown error occurred")]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, DataTransferError>;
|
||||
Reference in New Issue
Block a user