Exception: Gem::RemoteFetcher::FetchError

Inherits:
Exception
  • Object
show all
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.

Direct Known Subclasses

UnknownHostError

Instance Attribute Summary collapse

Attributes inherited from Exception

#source_exception

Instance Method Summary collapse

Constructor Details

#initialize(message, uri) ⇒ FetchError

Returns a new instance of FetchError.



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

def initialize(message, uri)
  super message
  @uri = uri
end

Instance Attribute Details

#uriObject

The URI which was being accessed when the exception happened.



23
24
25
# File 'lib/rubygems/remote_fetcher.rb', line 23

def uri
  @uri
end

Instance Method Details

#to_sObject

:nodoc:



30
31
32
# File 'lib/rubygems/remote_fetcher.rb', line 30

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