1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// use chrono::ParseError; // use std::num::ParseIntError; use thiserror::Error; #[derive(Debug, Error)] #[error(transparent)] pub enum LogError { IO(#[from] std::io::Error), SerdeJson(#[from] serde_json::Error), NotifyError(#[from] notify::Error), // #[error("Missing file name")] // MissingFileName, // #[error("Failed to represent file name")] // FailedToRepresentOsString, // #[error("Incorrect file name")] // IncorrectFileName, // #[error("Failed to parse timestamp of log file")] // FailedToParseLogTime(#[source] ParseError), // #[error("Failed to parse part number of log file")] // FailedToParsePart(#[source] ParseIntError), }