Skip to content

Commit

Permalink
Remove old CollectorError implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
BytePaws committed Oct 19, 2024
1 parent 8eec2ea commit c04e926
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions src/collectors/collector_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,60 +132,3 @@ impl CollectorError {
}
}

// /// Handles general errors with collecting information.
// ///
// /// Either because the command is unavailable, requires sudo privileges or other failures.
// ///
// /// As this is an Error this cannot be recovered from and the program must abort.
// pub struct UnableToCollectDataError {
// pub message: String,
// }

// impl fmt::Display for UnableToCollectDataError {
// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// write!(f, "{}", self.message)
// }
// }

// impl UnableToCollectDataError {
// pub fn abort(&self, exit_code: i32) -> ! {
// println!("{} (Error code: {})", self, exit_code);
// process::exit(exit_code)
// }
// }

// /// This exception shall be raised whenever a Network Interface cannot be identified.
// ///
// /// Usually because some or all parameters such as name, addr or mac_addr are missing.
// ///
// /// As this is an Error this cannot be recovered from and the program must abort.
// pub struct InvalidNetworkInterfaceError {
// pub message: String,
// }

// impl fmt::Display for InvalidNetworkInterfaceError {
// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// write!(f, "{}", self.message)
// }
// }

// impl InvalidNetworkInterfaceError {
// pub fn abort(&self, exit_code: i32) -> ! {
// println!("{} (Error code: {})", self, exit_code);
// process::exit(exit_code)
// }
// }

// /// This exception will be raised if no Network Interfaces can be found, so if the returned vector is empty.
// ///
// /// This is not a unrecoverable error.
// #[derive(Debug)]
// pub struct NoNetworkInterfacesException {
// pub message: String,
// }

// impl fmt::Display for NoNetworkInterfacesException {
// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// write!(f, "{}", self.message)
// }
// }

0 comments on commit c04e926

Please sign in to comment.