aboutsummaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
authorboastful-squirrel <boastful.squirrel@gmail.com>2019-05-01 15:01:41 +0000
committerboastful-squirrel <boastful.squirrel@gmail.com>2019-05-01 15:01:41 +0000
commite4bb38b17db665a8167feab9347494445385ebb3 (patch)
treec4608fd9ea443cf69113371c344bcf842b36b310 /src/errors.rs
parentDisplay HTTP authentication errors (diff)
downloadminiserve-e4bb38b17db665a8167feab9347494445385ebb3.tar.gz
miniserve-e4bb38b17db665a8167feab9347494445385ebb3.zip
Display 404 error
Diffstat (limited to '')
-rw-r--r--src/errors.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs
index a22127e..e5d2e41 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -72,6 +72,10 @@ pub enum ContextualError {
/// This error might occur when an HTTP request is invalid
#[fail(display = "Invalid HTTP request\ncaused by: {}", _0)]
InvalidHTTPRequestError(String),
+
+ /// This error might occur when trying to access a page that does not exist
+ #[fail(display = "Route {} could not be found", _0)]
+ RouteNotFoundError(String),
}
pub fn log_error_chain(description: String) {