Print unexpected error codes

This is breaking occaisionally but I can't repro it locally :(
This commit is contained in:
Steven Fackler 2014-12-19 19:56:31 -08:00
parent 1392970360
commit 217dad59df
1 changed files with 2 additions and 2 deletions

View File

@ -384,7 +384,7 @@ impl Ssl {
}
#[deriving(FromPrimitive)]
#[deriving(FromPrimitive, Show)]
#[repr(i32)]
enum LibSslError {
ErrorNone = ffi::SSL_ERROR_NONE,
@ -489,7 +489,7 @@ impl<S: Stream> SslStream<S> {
LibSslError::ErrorWantWrite => { try_ssl_stream!(self.flush()) }
LibSslError::ErrorZeroReturn => return Err(SslSessionClosed),
LibSslError::ErrorSsl => return Err(SslError::get()),
_ => unreachable!()
err => panic!("unexpected error {}", err),
}
}
}