diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-08-26 12:31:08 +0300 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-08-26 12:31:08 +0300 |
commit | acfcdaba4b9f5cb867229b07dea9d2b8654640f9 (patch) | |
tree | 0495c9819865a32a6df9537907744c60816bdef5 | |
parent | 2ae56d6de0791e811946559ecce50b9d497ef45d (diff) |
Catch "RecvErr" exceptions from curb.
This prevents a slightly ugly backtrace instead of a genuinely
useful report.
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index 997f2f9..ac29dbb 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -278,6 +278,8 @@ module Custodian end end + rescue Curl::Err::RecvError => x + errors << "#{protocol_msg}: Receive error: #{x.message}." rescue Curl::Err::SSLCACertificateError => x errors << "#{protocol_msg}: SSL validation error: #{x.message}." rescue Curl::Err::TimeoutError, Timeout::Error |