123456789_123456789_123456789_123456789_123456789_

Exception: Gem::RemoteFetcher::FetchError

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Gem::Exception, ::Gem::Deprecate, RuntimeError
Instance Chain:
self, ::Gem::UriParsing, ::Gem::Exception, RuntimeError
Inherits: Gem::Exception
Defined in: lib/rubygems/remote_fetcher.rb

Overview

A FetchError exception wraps up the various possible IO and HTTP failures that could happen while downloading from the internet.

Class Method Summary

::Gem::Deprecate - Extended

deprecate

Simple deprecation method that deprecates name by wrapping it up in a dummy method.

skip_during

Temporarily turn off warnings.

Instance Attribute Summary

  • #uri rw

    The URI which was being accessed when the exception happened.

::Gem::Exception - Inherited

Instance Method Summary

::Gem::UriParsing - Included

Constructor Details

.new(message, uri) ⇒ FetchError

[ GitHub ]

  
# File 'lib/rubygems/remote_fetcher.rb', line 36

def initialize(message, uri)
  super message

  uri = parse_uri(uri)

  uri.password = 'REDACTED' if uri.respond_to?(:password) && uri.password

  @uri = uri.to_s
end

Instance Attribute Details

#uri (rw)

The URI which was being accessed when the exception happened.

[ GitHub ]

  
# File 'lib/rubygems/remote_fetcher.rb', line 34

attr_accessor :uri

Instance Method Details

#to_s

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/remote_fetcher.rb', line 46

def to_s # :nodoc:
  "#{super} (#{uri})"
end