godwit_daemon/errors/
mod.rs1use custom_error::custom_error;
5
6custom_error! {pub PatchError
7 IO {source: std::io::Error} = "IO error occured.",
8 Glob {source: glob::GlobError} = "GlobError occured.",
9 FromUtf8 {source: std::string::FromUtf8Error} = "FromUtf8Error occured.",
10 Serde {source: serde_json::Error} = "Serde_Json error occured.",
11}
12
13custom_error! {pub PurgeBaseError
14 IO {source: std::io::Error} = "IO error occured.",
15 Glob {source: glob::GlobError} = "GlobError occured.",
16 FromUtf8 {source: std::string::FromUtf8Error} = "FromUtf8Error occured.",
17}
18
19custom_error! {pub RevisionError
20 BaseNotFound {base_path: String} = "Base file at {base_path} wasn't found. Can't traverse the revision.",
21 IO {source: std::io::Error} = "IO error occured.",
22 GlobPattern {source: glob::PatternError} = "PatternError occured.",
23 SerdeError {source: serde_json::Error} = "Serde_Json error occured.",
24 Patch {source: PatchError} = "PatchError occured.",
25}
26
27custom_error! {pub BackendError
28 NotFound {backend_str: String} = "Backend {backend_str} not found.",
29 Glob {source: glob::GlobError} = "GlobError occured.",
30 VersionMismatch = "RUSTC_VERSION or CORE_VERSION mismatched.",
31 LibLoading {source: libloading::Error} = "Dynamic libloading threw unexpected error.",
32}
33
34custom_error! {pub TraceError
35 Backend {source: BackendError} = "Backend threw unexpected error.",
36 Internal {err_str: String} = "Backend threw custom error: {err_str}",
37 IO {source: std::io::Error} = "IO error occured.",
38 Glob {source: glob::GlobError} = "GlobError occured.",
39 GlobPattern {source: glob::PatternError} = "PatternError occured.",
40 PurgeBase {source: PurgeBaseError} = "PurgeBaseError occured.",
41 Patch {source: PatchError} = "PatchError occured.",
42 Revision {source: RevisionError} = "RevisionError occured.",
43}
44
45custom_error! {pub DelegateError
46 PurgeBase {source: PurgeBaseError} = "PurgeBaseError occured.",
47 Backend {source: BackendError} = "BackendError occured.",
48 Trace {source: TraceError} = "TraceError occured.",
49}
50
51custom_error! {pub NetworkError
52 IO {source: std::io::Error} = "IO error occured.",
53 ZMQ {source: zmq::Error} = "ZMQ error occured.",
54 Serde {source: serde_json::Error} = "Serde_Json error occured."
55}
56
57custom_error! {pub RunError
58 Network {source: NetworkError} = "NetworkError occured."
59}