Kouhei Sutou 2018-11-19 08:54:56 +0900 (Mon, 19 Nov 2018) Revision: 538533d2deb9425cca8bd877fbe2000a31918f47 https://github.com/groonga/grntest/commit/538533d2deb9425cca8bd877fbe2000a31918f47 Message: Handle errors from net/http Modified files: lib/grntest/executors/http-executor.rb Modified: lib/grntest/executors/http-executor.rb (+8 -0) =================================================================== --- lib/grntest/executors/http-executor.rb 2018-11-17 10:34:16 +0900 (aebeba0) +++ lib/grntest/executors/http-executor.rb 2018-11-19 08:54:56 +0900 (cee2a54) @@ -91,6 +91,14 @@ module Grntest raise Error.new(message) rescue OpenURI::HTTPError $!.io.read + rescue Net::HTTPBadResponse + message = "bad response from Groonga: <#{url}>: " + message << "#{$!.class}: #{$!.message}" + raise Error.new(message) + rescue Net::HTTPHeaderSyntaxError + message = "bad HTTP header syntax in Groonga response: <#{url}>: " + message << "#{$!.class}: #{$!.message}" + raise Error.new(message) end end -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181119/ff3e49b3/attachment.html>