From 1a5e6e39af19d572a9de7f54e66bef911bdbbf2f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 6 Apr 2020 19:55:39 +0200 Subject: Some more basic work --- src/error.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 9929a896..1e611adb 100644 --- a/src/error.rs +++ b/src/error.rs @@ -9,11 +9,23 @@ pub enum Error { #[error(display = "Hyper error")] Hyper(#[error(source)] hyper::Error), + #[error(display = "HTTP error")] + HTTP(#[error(source)] http::Error), + #[error(display = "Messagepack encode error")] RMPEncode(#[error(source)] rmp_serde::encode::Error), #[error(display = "Messagepack decode error")] RMPDecode(#[error(source)] rmp_serde::decode::Error), + #[error(display = "TOML decode error")] + TomlDecode(#[error(source)] toml::de::Error), + + #[error(display = "Timeout")] + RPCTimeout(#[error(source)] tokio::time::Elapsed), + + #[error(display = "RPC error")] + RPCError(String), + #[error(display = "")] - Msg(String), + Message(String), } -- cgit v1.2.3