aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-07 18:10:20 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-07 18:10:20 +0200
commit90cdffb425c6222f4234db54a16c079d8c058724 (patch)
tree2a836af28b5bce3969560fa4f45973b8392629c2 /src/error.rs
parent82b7fcd280d416aabc4f94a99a17c8d9e99888be (diff)
downloadgarage-90cdffb425c6222f4234db54a16c079d8c058724.tar.gz
garage-90cdffb425c6222f4234db54a16c079d8c058724.zip
custom data type for hashes and identifiers
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/error.rs b/src/error.rs
index 1e611adb..fd717638 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -3,29 +3,29 @@ use std::io;
#[derive(Debug, Error)]
pub enum Error {
- #[error(display = "IO error")]
+ #[error(display = "IO error: {}", _0)]
Io(#[error(source)] io::Error),
- #[error(display = "Hyper error")]
+ #[error(display = "Hyper error: {}", _0)]
Hyper(#[error(source)] hyper::Error),
- #[error(display = "HTTP error")]
+ #[error(display = "HTTP error: {}", _0)]
HTTP(#[error(source)] http::Error),
- #[error(display = "Messagepack encode error")]
+ #[error(display = "Messagepack encode error: {}", _0)]
RMPEncode(#[error(source)] rmp_serde::encode::Error),
- #[error(display = "Messagepack decode error")]
+ #[error(display = "Messagepack decode error: {}", _0)]
RMPDecode(#[error(source)] rmp_serde::decode::Error),
- #[error(display = "TOML decode error")]
+ #[error(display = "TOML decode error: {}", _0)]
TomlDecode(#[error(source)] toml::de::Error),
- #[error(display = "Timeout")]
+ #[error(display = "Timeout: {}", _0)]
RPCTimeout(#[error(source)] tokio::time::Elapsed),
- #[error(display = "RPC error")]
+ #[error(display = "RPC error: {}", _0)]
RPCError(String),
- #[error(display = "")]
+ #[error(display = "{}", _0)]
Message(String),
}