nex5_sort/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum SortError {
5 #[error("nex5 error: {0}")]
6 Nex(#[from] nex5file::NexError),
7
8 #[error("I/O error: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("npy error: {0}")]
12 Npy(String),
13
14 #[error("phy/kilosort error: {0}")]
15 Phy(String),
16
17 #[error("{0}")]
18 Other(String),
19}
20
21pub type Result<T> = core::result::Result<T, SortError>;