Exception: LibGems::RemoteFetcher::FetchError

Inherits:
Exception
  • Object
show all
Defined in:
lib/libgems/remote_fetcher.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, uri) ⇒ FetchError

Returns a new instance of FetchError.



27
28
29
30
# File 'lib/libgems/remote_fetcher.rb', line 27

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

Instance Attribute Details

#uriObject

The URI which was being accessed when the exception happened.



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

def uri
  @uri
end

Instance Method Details

#to_sObject

:nodoc:



32
33
34
# File 'lib/libgems/remote_fetcher.rb', line 32

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