mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Make rescue
clause more specific
This is hiding a real bundler issue as a "network error". It's more
helpful to get a proper bug report, with stack trace and so on.
So stop re-raising errors when evaluating unmarshaled responses as
network errors, and only raise Marshal errors when the Marshal format is
invalid, not whenever marshalled gemspecs can't be loaded because that
may hide actual client errors, like missing `YAML` constants.
05ea907e1c
This commit is contained in:
parent
0140e6c41e
commit
d32fa986c3
1 changed files with 1 additions and 1 deletions
|
@ -561,7 +561,7 @@ EOF
|
||||||
|
|
||||||
def load_marshal(data)
|
def load_marshal(data)
|
||||||
Marshal.load(data)
|
Marshal.load(data)
|
||||||
rescue StandardError => e
|
rescue TypeError => e
|
||||||
raise MarshalError, "#{e.class}: #{e.message}"
|
raise MarshalError, "#{e.class}: #{e.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue