use error_tools::dependency::thiserror;
#[ derive( thiserror::Error, Debug ) ]
pub enum Error
{
#[ error( "Terminal I/O error: {0}" ) ]
Io( #[ from ] std::io::Error ),
#[ error( "Not running in a terminal (no TTY)" ) ]
NoTty,
#[ error( "Validation failed: {0}" ) ]
ValidationFailed( String ),
#[ error( "Terminal too small ({width}x{height}, need at least {min_width}x{min_height})" ) ]
TerminalTooSmall
{
width: u16,
height: u16,
min_width: u16,
min_height: u16,
},
}