Navigation Menu

Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent 6a22da5 commit 37e3fec
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/drndump/dump_client.rb
Expand Up @@ -97,16 +97,10 @@ def run(options={}, &block)
yield(message)
end
when NilClass
@client.close
error = NilMessage.new("nil message in dump")
on_error(error)
@error_message = error.to_s
raise NilMessage.new("nil message in dump")
else
@client.close
error = InvalidMessage.new("invalid message in dump",
:message => message.inspect)
on_error(error)
@error_message = error.to_s
raise InvalidMessage.new("invalid message in dump",
:message => message.inspect)
end
rescue Exception => exception
@client.close
Expand Down

0 comments on commit 37e3fec

Please sign in to comment.