1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum RegionSetError {
5 #[error("Can't read file: {0}")]
6 FileReadError(String),
7
8 #[error("Can't get file from path or url: {0}")]
9 InvalidPathOrUrl(String),
10
11 #[error("BEDbase identifier is not valid UTF-8: {0}")]
12 InvalidBedbaseIdentifier(String),
13
14 #[error("Can't get file from BEDbase: {0}")]
15 BedbaseFetchError(String),
16
17 #[error("Error parsing region: {0}")]
18 RegionParseError(String),
19
20 #[error("Corrupted file. 0 regions found in the file: {0}")]
21 EmptyRegionSet(String),
22
23 #[error("File not found and HTTP feature not enabled: {0}")]
24 HttpFeatureDisabled(String),
25
26 #[error("BigBed error: {0}")]
27 BigBedError(String),
28
29 #[error(transparent)]
30 Io(#[from] std::io::Error),
31}