diff options
author | David RodrÃguez <[email protected]> | 2022-03-22 15:59:08 +0100 |
---|---|---|
committer | git <[email protected]> | 2022-03-23 23:31:05 +0900 |
commit | d32fa986c3631fddcb256dbd39d10b358fb40ead (patch) | |
tree | 04d015195af0293c1ec3a7bb04d109216d612830 /lib/bundler.rb | |
parent | 0140e6c41e4669e157c5a99b9d4b5b0fa153359b (diff) |
[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.
https://github.com/rubygems/rubygems/commit/05ea907e1c
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r-- | lib/bundler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 8688206285..0025dee720 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -561,7 +561,7 @@ EOF def load_marshal(data) Marshal.load(data) - rescue StandardError => e + rescue TypeError => e raise MarshalError, "#{e.class}: #{e.message}" end |