forked from jaemk/mini_http
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherrors.rs
28 lines (27 loc) · 834 Bytes
/
errors.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use http;
error_chain! {
foreign_links {
Io(::std::io::Error);
Utf8(::std::str::Utf8Error);
AddrParse(::std::net::AddrParseError);
Http(http::Error);
}
errors {
MalformedHttpRequest(s: String) {
description("Malformed HTTP Request")
display("MalformedHttpRequest: {}", s)
}
IncompleteHttpRequest(s: String) {
description("Incomplete HTTP Request")
display("IncompleteHttpRequest: {}", s)
}
RequestHeadersTooLarge(s: String) {
description("Request Headers Too Large")
display("RequestHeadersTooLarge: {}", s)
}
RequestBodyTooLarge(s: String) {
description("Request Body Too Large")
display("RequestBodyTooLarge: {}", s)
}
}
}