1use std::io;
2
3#[derive(Debug, thiserror::Error)]
4pub enum IoError {
5 #[error("I/O error: {0}")]
6 Io(#[from] io::Error),
7
8 #[error("FASTA parse error: {0}")]
9 FastaParse(String),
10
11 #[error("hat2 format error: {0}")]
12 Hat2Format(String),
13
14 #[error("localhom format error: {0}")]
15 LocalHomFormat(String),
16
17 #[error("no sequences found in input")]
18 EmptyInput,
19
20 #[error("The first character of a description line must be \nthe greater-than (>) symbol, not a blank.\nPlease check the format around the following line(s):\n{line}:{text}")]
25 BlankBeforeHeader { line: usize, text: String },
26
27 #[error("Characters '= < >' can be used only in the title lines in the --anysymbol or --text mode.")]
32 IllegalTitleCharInSequence,
33
34 #[error("sequence count mismatch: expected {expected}, got {got}")]
35 SeqCountMismatch { expected: usize, got: usize },
36}