aboutsummaryrefslogtreecommitdiff
path: root/src/util/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/error.rs')
-rw-r--r--src/util/error.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/util/error.rs b/src/util/error.rs
index c8d3c680..626958da 100644
--- a/src/util/error.rs
+++ b/src/util/error.rs
@@ -48,12 +48,13 @@ pub enum Error {
Timeout,
#[error(
- display = "Could not reach quorum. {} of {} request succeeded, others returned errors: {:?}",
+ display = "Could not reach quorum of {}. {} of {} request succeeded, others returned errors: {:?}",
_0,
_1,
- _2
+ _2,
+ _3
)]
- Quorum(usize, usize, Vec<String>),
+ Quorum(usize, usize, usize, Vec<String>),
#[error(display = "Bad RPC: {}", _0)]
BadRpc(String),
@@ -110,11 +111,7 @@ where
fn err_context<C: std::borrow::Borrow<str>>(self, ctx: C) -> Result<T, Error> {
match self {
Ok(x) => Ok(x),
- Err(e) => Err(Error::Message(format!(
- "{}\nOriginal error: {}",
- ctx.borrow(),
- e
- ))),
+ Err(e) => Err(Error::Message(format!("{}\n{}", ctx.borrow(), e))),
}
}
}