From c04e926c6f837270e8822ac1734decab2156c122 Mon Sep 17 00:00:00 2001 From: TiaraNivani Date: Sun, 20 Oct 2024 01:14:56 +0200 Subject: [PATCH] Remove old CollectorError implementation --- src/collectors/collector_exceptions.rs | 57 -------------------------- 1 file changed, 57 deletions(-) diff --git a/src/collectors/collector_exceptions.rs b/src/collectors/collector_exceptions.rs index 521c141..c651204 100644 --- a/src/collectors/collector_exceptions.rs +++ b/src/collectors/collector_exceptions.rs @@ -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) -// } -// }