1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-28 01:52:57 +01:00

add cause for nested errors

This commit is contained in:
Nikolay Kim 2018-11-28 09:10:13 -10:00
parent 06387fc778
commit d269904fbf

View File

@ -35,19 +35,19 @@ pub enum ClientError {
InvalidChallengeResponse(String, HeaderValue), InvalidChallengeResponse(String, HeaderValue),
/// Http parsing error /// Http parsing error
#[fail(display = "Http parsing error")] #[fail(display = "Http parsing error")]
Http(HttpError), Http(#[cause] HttpError),
/// Response parsing error /// Response parsing error
#[fail(display = "Response parsing error: {}", _0)] #[fail(display = "Response parsing error: {}", _0)]
ParseError(ParseError), ParseError(#[cause] ParseError),
/// Protocol error /// Protocol error
#[fail(display = "{}", _0)] #[fail(display = "{}", _0)]
Protocol(#[cause] ProtocolError), Protocol(#[cause] ProtocolError),
/// Connect error /// Connect error
#[fail(display = "{:?}", _0)] #[fail(display = "Connector error: {:?}", _0)]
Connect(ConnectorError), Connect(ConnectorError),
/// IO Error /// IO Error
#[fail(display = "{}", _0)] #[fail(display = "{}", _0)]
Io(io::Error), Io(#[cause] io::Error),
/// "Disconnected" /// "Disconnected"
#[fail(display = "Disconnected")] #[fail(display = "Disconnected")]
Disconnected, Disconnected,