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, RuntimeError
Instance Chain:
self, ::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

Instance Attribute Summary

  • #original_uri rw

    The URI which was being accessed when the exception happened.

  • #uri rw

    The URI which was being accessed when the exception happened.

Instance Method Summary

Constructor Details

.new(message, uri) ⇒ FetchError

[ GitHub ]

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

def initialize(message, uri)
  uri = Gem::Uri.new(uri)

  super uri.redact_credentials_from(message)

  @original_uri = uri.to_s
  @uri = uri.redacted.to_s
end

Instance Attribute Details

#original_uri (rw)

The URI which was being accessed when the exception happened.

[ GitHub ]

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

attr_accessor :uri, :original_uri

#uri (rw)

The URI which was being accessed when the exception happened.

[ GitHub ]

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

attr_accessor :uri, :original_uri

Instance Method Details

#to_s

This method is for internal use only.
[ GitHub ]

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

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