forked from NationTech/harmony
chore: Reorganize file tree for easier onboarding. Rust project now at the root for simple git clone && cargo run
This commit is contained in:
19
opnsense-config/src/error.rs
Normal file
19
opnsense-config/src/error.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
#[error("XML error: {0}")]
|
||||
Xml(String),
|
||||
#[error("SSH error: {0}")]
|
||||
Ssh(#[from] russh::Error),
|
||||
#[error("SSH Client error: {0}")]
|
||||
SftpClient(#[from] russh_sftp::client::error::Error),
|
||||
#[error("Command failed : {0}")]
|
||||
Command(String),
|
||||
#[error("I/O error: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
#[error("Config error: {0}")]
|
||||
Config(String),
|
||||
#[error("Unexpected error: {0}")]
|
||||
Unexpected(String),
|
||||
}
|
||||
Reference in New Issue
Block a user