summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-08-26 12:31:08 +0300
committerSteve Kemp <steve@steve.org.uk>2015-08-26 12:31:08 +0300
commitacfcdaba4b9f5cb867229b07dea9d2b8654640f9 (patch)
tree0495c9819865a32a6df9537907744c60816bdef5
parent2ae56d6de0791e811946559ecce50b9d497ef45d (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.rb2
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