timelog/entry/
error.rs

1//! Module representing errors encountered parsing entry lines.
2
3use thiserror;
4
5/// Errors reported attempting to parse an entry line.
6#[derive(Clone, Copy, Eq, thiserror::Error, Debug, PartialEq)]
7pub enum EntryError {
8    /// Entry line contains no text
9    #[error("Line is empty")]
10    BlankLine,
11
12    /// Timestamp on entry line is unparseable
13    #[error("Not a valid timestamp")]
14    InvalidTimeStamp,
15
16    /// Entry line is missing a task description
17    #[error("No task description")]
18    MissingTask,
19
20    /// Entry line has unrecognized marker
21    #[error("Unrecognized entry marker")]
22    InvalidMarker
23}