matchmaker/errors.rs
1pub use anyhow::Result;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5#[non_exhaustive]
6pub enum MatchError {
7 /// Exited via [`crate::action::Action::Quit`]
8 #[error("Aborted: {0}")]
9 Abort(i32),
10 /// Event loop closed
11 #[error("Event loop closed.")]
12 EventLoopClosed,
13 /// Exited via [`crate::action::Action::Become`]
14 #[error("Became: {0}")]
15 Become(String),
16 /// Critical error in TUI initialization/execution.
17 #[error("TUI Error: {0}")]
18 TUIError(String),
19 /// Specifically for [`crate::MatchResultExt::first`], this
20 /// error should not arise in normal execution
21 /// unless cursor is disabled when the render
22 /// loop exits with success status.
23 /// The cursor is never disabled in the binary crate.
24 #[error("no match")]
25 NoMatch,
26}