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
43
44
45
46
use failure_derive::Fail;
#[derive(Debug, Fail)]
pub enum ArgminError {
#[fail(display = "Invalid parameter: {}", text)]
InvalidParameter { text: String },
#[fail(display = "Not implemented: {}", text)]
NotImplemented { text: String },
#[fail(display = "Not initialized: {}", text)]
NotInitialized { text: String },
#[fail(display = "Condition violated: {}", text)]
ConditionViolated { text: String },
#[fail(display = "Checkpoint not found: {}", text)]
CheckpointNotFound { text: String },
#[fail(display = "Impossible Error: {}", text)]
ImpossibleError { text: String },
}
#[cfg(test)]
mod tests {
use super::*;
send_sync_test!(error, ArgminError);
}