diff options
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/cli.rb | 2 | ||||
-rw-r--r-- | lib/bundler/endpoint_specification.rb | 2 | ||||
-rw-r--r-- | lib/bundler/env.rb | 2 | ||||
-rw-r--r-- | lib/bundler/fetcher.rb | 2 | ||||
-rw-r--r-- | lib/bundler/gem_helper.rb | 2 | ||||
-rw-r--r-- | lib/bundler/installer.rb | 2 | ||||
-rw-r--r-- | lib/bundler/installer/gem_installer.rb | 2 | ||||
-rw-r--r-- | lib/bundler/installer/parallel_installer.rb | 2 | ||||
-rw-r--r-- | lib/bundler/mirror.rb | 4 | ||||
-rw-r--r-- | lib/bundler/plugin.rb | 4 | ||||
-rw-r--r-- | lib/bundler/plugin/index.rb | 2 | ||||
-rw-r--r-- | lib/bundler/runtime.rb | 2 |
12 files changed, 14 insertions, 14 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 33796ea9a6..d86441f5ae 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -745,7 +745,7 @@ module Bundler end Bundler.ui.warn "The latest bundler is #{latest}, but you are currently running #{current}.\n#{suggestion}" - rescue + rescue RuntimeError nil end end diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb index 8668c4ea7f..9a00b64e0e 100644 --- a/lib/bundler/endpoint_specification.rb +++ b/lib/bundler/endpoint_specification.rb @@ -123,7 +123,7 @@ module Bundler @required_ruby_version = Gem::Requirement.new(v) end end - rescue => e + rescue StandardError => e raise GemspecError, "There was an error parsing the metadata for the gem #{name} (#{version}): #{e.class}\n#{e}\nThe metadata was #{data.inspect}" end diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb index 58fe20dbe7..b91a345cee 100644 --- a/lib/bundler/env.rb +++ b/lib/bundler/env.rb @@ -64,7 +64,7 @@ module Bundler File.read(filename.to_s).strip rescue Errno::ENOENT "<No #{filename} found>" - rescue => e + rescue RuntimeError => e "#{e.class}: #{e.message}" end diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index 444778b36b..4dd42e42ff 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -178,7 +178,7 @@ module Bundler # engine_version raises on unknown engines engine_version = begin ruby.engine_versions - rescue + rescue RuntimeError "???" end agent << " #{ruby.engine}/#{ruby.versions_string(engine_version)}" diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 3458a2adda..ba996d8a85 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -160,7 +160,7 @@ module Bundler sh %W[git tag -m Version\ #{version} #{version_tag}] Bundler.ui.confirm "Tagged #{version_tag}." yield if block_given? - rescue + rescue RuntimeError Bundler.ui.error "Untagging #{version_tag} due to error." sh_with_status %W[git tag -d #{version_tag}] raise diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 1b9fef1e39..58241367f2 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -220,7 +220,7 @@ module Bundler def processor_count require "etc" Etc.nprocessors - rescue + rescue Runtimeerror 1 end diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb index a38f8d95be..d60d636949 100644 --- a/lib/bundler/installer/gem_installer.rb +++ b/lib/bundler/installer/gem_installer.rb @@ -21,7 +21,7 @@ module Bundler raise rescue Errno::ENOSPC return false, out_of_space_message - rescue => e + rescue StandardError => e return false, specific_failure_message(e) end diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb index e6e81fddff..61ee001538 100644 --- a/lib/bundler/installer/parallel_installer.rb +++ b/lib/bundler/installer/parallel_installer.rb @@ -161,7 +161,7 @@ module Bundler ) success, message = begin gem_installer.install_from_spec - rescue => e + rescue RuntimeError => e raise e, "#{e}\n\n#{require_tree_for_spec(spec_install.spec)}" end if success diff --git a/lib/bundler/mirror.rb b/lib/bundler/mirror.rb index a6fa070eb8..b15190e7e5 100644 --- a/lib/bundler/mirror.rb +++ b/lib/bundler/mirror.rb @@ -152,7 +152,7 @@ module Bundler socket.connect_nonblock(address) rescue Errno::EINPROGRESS wait_for_writtable_socket(socket, address, timeout) - rescue # Connection failed somehow, again + rescue RuntimeError # Connection failed somehow, again false end end @@ -172,7 +172,7 @@ module Bundler socket.connect_nonblock(address) rescue Errno::EISCONN true - rescue # Connection failed + rescue StandardError # Connection failed false end end diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb index f7e6093fa5..127f1f64c0 100644 --- a/lib/bundler/plugin.rb +++ b/lib/bundler/plugin.rb @@ -86,7 +86,7 @@ module Bundler installed_specs = Installer.new.install_definition(definition) save_plugins plugins, installed_specs, builder.inferred_plugins - rescue => e + rescue RuntimeError => e unless e.is_a?(GemfileError) Bundler.ui.error "Failed to install plugin: #{e.message}\n #{e.backtrace[0]}" end @@ -284,7 +284,7 @@ module Bundler load path.join(PLUGIN_FILE_NAME) @loaded_plugin_names << name - rescue => e + rescue RuntimeError => e Bundler.ui.error "Failed loading plugin #{name}: #{e.message}" raise end diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb index f5c2baf431..cd7a5093b3 100644 --- a/lib/bundler/plugin/index.rb +++ b/lib/bundler/plugin/index.rb @@ -58,7 +58,7 @@ module Bundler @plugin_paths[name] = path @load_paths[name] = load_paths save_index - rescue + rescue StandardError @commands = old_commands raise end diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index acaae3cedf..762e7b3ec6 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -79,7 +79,7 @@ module Bundler required_file = file begin Kernel.require file - rescue => e + rescue RuntimeError => e raise e if e.is_a?(LoadError) # we handle this a little later raise Bundler::GemRequireError.new e, "There was an error while trying to load the gem '#{file}'." |