diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-08 22:41:47 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-08 22:41:47 +0900 |
commit | 85f218f35d2e9f1332701d908d9570c698708620 (patch) | |
tree | 07d12c528d5b40a57280c4617bb5ac9be6a4a55b | |
parent | 60e7ce6f29bc40515074df712670bf61094549dd (diff) | |
parent | 01782221f68a642e4f7f6d5507a01dcb2661043d (diff) | |
download | plum-85f218f35d2e9f1332701d908d9570c698708620.tar.gz |
Merge branch 'topic/cleanup-decoder-error'
* topic/cleanup-decoder-error:
client: remove inner_error attribute from DecoderError
-rw-r--r-- | lib/plum/client/decoders.rb | 8 | ||||
-rw-r--r-- | lib/plum/errors.rb | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/lib/plum/client/decoders.rb b/lib/plum/client/decoders.rb index d68f27b..f1d9ed9 100644 --- a/lib/plum/client/decoders.rb +++ b/lib/plum/client/decoders.rb @@ -18,13 +18,13 @@ module Plum def decode(chunk) @inflate.inflate(chunk) rescue Zlib::Error - raise DecoderError.new("failed to decode chunk", $!) + raise DecoderError, "failed to decode chunk" end def finish @inflate.finish rescue Zlib::Error - raise DecoderError.new("failed to finalize", $!) + raise DecoderError, "failed to finalize" end end @@ -36,13 +36,13 @@ module Plum def decode(chunk) @stream.inflate(chunk) rescue Zlib::Error - raise DecoderError.new("failed to decode chunk", $!) + raise DecoderError, "failed to decode chunk" end def finish @stream.finish rescue Zlib::Error - raise DecoderError.new("failed to finalize", $!) + raise DecoderError, "failed to finalize" end end diff --git a/lib/plum/errors.rb b/lib/plum/errors.rb index d6a9f39..700e0ef 100644 --- a/lib/plum/errors.rb +++ b/lib/plum/errors.rb @@ -53,12 +53,5 @@ module Plum end end - class DecoderError < Error - attr_reader :inner_error - - def initialize(message, inner_error = nil) - super(message) - @inner_error = inner_error - end - end + class DecoderError < Error; end end |