may_clack/error.rs
1//! Error
2
3use rustyline::error::ReadlineError;
4use thiserror::Error;
5
6/// The error type for clack errors
7#[non_exhaustive]
8#[derive(Error, Debug)]
9pub enum ClackError {
10 /// I/O error
11 #[error("io error")]
12 IoError(#[from] std::io::Error),
13 /// Clack input cancelled
14 #[error("operation cancelled")]
15 Cancelled,
16 /// Rustyline readline error
17 #[error("readline error")]
18 ReadlineError(#[from] ReadlineError),
19 /// No options specified
20 #[error("no options specified")]
21 NoOptions,
22}