todo_txt/errors.rs
1pub type Result<T = ()> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("Launch this program via todo.sh")]
6 Env,
7 #[error("Invalid period: {0}")]
8 InvalidPeriod(String),
9 #[error("Invalid priority: {0}")]
10 InvalidPriority(char),
11 #[error("Invalid recurrence: {0}")]
12 InvalidRecurrence(String),
13 #[error("Unable to save note: {0}")]
14 Note(std::io::Error),
15}