1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate AtmosphereBuilderError;
/* impl fmt::Display for CrseoError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::GmtModesPath(p) => write!(f, "The path {:?} does not exist, set the environment variable GMT_MODES_PATH to the path to the directory that contains the files with the modes.",p),
Self::FFI(e) => e.fmt(f)
}
}
}
impl fmt::Debug for CrseoError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
<CrseoError as std::fmt::Display>::fmt(self, f)
}
}
impl std::error::Error for CrseoError {}
/*impl From<std::env::VarError> for CrseoError {
fn from(e: std::env::VarError) -> Self {
CrseoError::Env(e)
}
}*/
impl From<ffi::NulError> for CrseoError {
fn from(e: ffi::NulError) -> Self {
CrseoError::FFI(e)
}
}
*/