1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Error
use rustyline::error::ReadlineError;
use thiserror::Error;

/// The error type for clack errors
#[non_exhaustive]
#[derive(Error, Debug)]
pub enum ClackError {
	/// I/O error
	#[error("io error")]
	IoError(#[from] std::io::Error),
	/// Clack input cancelled
	#[error("operation cancelled")]
	Cancelled,
	/// Rustyline readline error
	#[error("readline error")]
	ReadlineError(#[from] ReadlineError),
	/// No options specified
	#[error("no options specified")]
	NoOptions,
}