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