From 49fa0ff7e0e232eca3cfacb7930a8b99b0486863 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Tue, 15 Oct 2019 23:36:23 -0400 Subject: [PATCH] make error descriptions more useful --- src/error.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/error.rs b/src/error.rs index 9d29a86..2e40750 100644 --- a/src/error.rs +++ b/src/error.rs @@ -3,12 +3,12 @@ use custom_error::custom_error; custom_error!{pub WebmetroError ResourcesExceeded = "resources exceeded", - EbmlError{source: crate::ebml::EbmlError} = "EBML error", - HttpError{source: http::Error} = "HTTP error", - HyperError{source: hyper::Error} = "Hyper error", - IoError{source: std::io::Error} = "IO error", - TimerError{source: tokio::timer::Error} = "Timer error", - WarpError{source: warp::Error} = "Warp error", + EbmlError{source: crate::ebml::EbmlError} = "EBML error: {source}", + HttpError{source: http::Error} = "HTTP error: {source}", + HyperError{source: hyper::Error} = "Hyper error: {source}", + IoError{source: std::io::Error} = "IO error: {source}", + TimerError{source: tokio::timer::Error} = "Timer error: {source}", + WarpError{source: warp::Error} = "Warp error: {source}", ApplicationError{message: String} = "{message}" }