aboutsummaryrefslogtreecommitdiff
path: root/src/ssl
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2014-12-19 19:56:31 -0800
committerSteven Fackler <[email protected]>2014-12-19 19:56:31 -0800
commit217dad59dfbed952aa3eb0b18045dfbc1fe61b67 (patch)
tree61964734d52a0e935096d1a835285b85a7ab86c0 /src/ssl
parentRelease v0.2.6 (diff)
downloadrust-openssl-217dad59dfbed952aa3eb0b18045dfbc1fe61b67.tar.xz
rust-openssl-217dad59dfbed952aa3eb0b18045dfbc1fe61b67.zip
Print unexpected error codes
This is breaking occaisionally but I can't repro it locally :(
Diffstat (limited to 'src/ssl')
-rw-r--r--src/ssl/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs
index 8930a3c5..b0db32ea 100644
--- a/src/ssl/mod.rs
+++ b/src/ssl/mod.rs
@@ -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),
}
}
}