diff options
-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 |