diff options
| author | Steven Fackler <[email protected]> | 2014-12-19 19:56:31 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-12-19 19:56:31 -0800 |
| commit | 217dad59dfbed952aa3eb0b18045dfbc1fe61b67 (patch) | |
| tree | 61964734d52a0e935096d1a835285b85a7ab86c0 | |
| parent | Release v0.2.6 (diff) | |
| download | rust-openssl-217dad59dfbed952aa3eb0b18045dfbc1fe61b67.tar.xz rust-openssl-217dad59dfbed952aa3eb0b18045dfbc1fe61b67.zip | |
Print unexpected error codes
This is breaking occaisionally but I can't repro it locally :(
| -rw-r--r-- | src/ssl/mod.rs | 4 |
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), } } } |