diff options
author | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 08:30:01 +0000 |
---|---|---|
committer | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 08:30:01 +0000 |
commit | 40528631f1f1bac93fb7107f5d383c0d8ff97f3a (patch) | |
tree | 71f019148acb1c9ca10ed06f308a3f03badafe97 /lib/drb/drb.rb | |
parent | 82a64917c7268f7993a080a921a8a963b48ebdb8 (diff) | |
download | ruby-40528631f1f1bac93fb7107f5d383c0d8ff97f3a.tar.gz ruby-40528631f1f1bac93fb7107f5d383c0d8ff97f3a.tar.xz ruby-40528631f1f1bac93fb7107f5d383c0d8ff97f3a.zip |
re-raise DRbConnError
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb/drb.rb')
-rw-r--r-- | lib/drb/drb.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb index 20e17bd25..fb083b0c4 100644 --- a/lib/drb/drb.rb +++ b/lib/drb/drb.rb @@ -353,13 +353,7 @@ module DRb # Error raised when an error occurs on the underlying communication # protocol. - class DRbConnError < DRbError - def self.new_with_error(cause) - conn_error = self.new(cause.message) - conn_error.set_backtrace(cause.backtrace) - conn_error - end - end + class DRbConnError < DRbError; end # Class responsible for converting between an object and its id. # @@ -558,7 +552,7 @@ module DRb begin sz = soc.read(4) # sizeof (N) rescue - raise(DRbConnError.new_with_error($!)) + raise(DRbConnError, $!.message, $!.backtrace) end raise(DRbConnError, 'connection closed') if sz.nil? raise(DRbConnError, 'premature header') if sz.size < 4 @@ -567,7 +561,7 @@ module DRb begin str = soc.read(sz) rescue - raise(DRbConnError.new_with_error($!)) + raise(DRbConnError, $!.message, $!.backtrace) end raise(DRbConnError, 'connection closed') if sz.nil? raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz |