Exception: Gem::RemoteFetcher::FetchError
- 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
Instance Attribute Summary collapse
- 
  
    
      #original_uri  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The URI which was being accessed when the exception happened.
 - 
  
    
      #uri  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The URI which was being accessed when the exception happened.
 
Instance Method Summary collapse
- 
  
    
      #initialize(message, uri)  ⇒ FetchError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of FetchError.
 - 
  
    
      #to_s  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
:nodoc:.
 
Constructor Details
#initialize(message, uri) ⇒ FetchError
Returns a new instance of FetchError.
      27 28 29 30 31 32 33 34  | 
    
      # File 'lib/rubygems/remote_fetcher.rb', line 27 def initialize(, uri) uri = Gem::Uri.new(uri) super uri.redact_credentials_from() @original_uri = uri.to_s @uri = uri.redacted.to_s end  | 
  
Instance Attribute Details
#original_uri ⇒ Object
The URI which was being accessed when the exception happened.
      25 26 27  | 
    
      # File 'lib/rubygems/remote_fetcher.rb', line 25 def original_uri @original_uri end  | 
  
#uri ⇒ Object
The URI which was being accessed when the exception happened.
      25 26 27  | 
    
      # File 'lib/rubygems/remote_fetcher.rb', line 25 def uri @uri end  | 
  
Instance Method Details
#to_s ⇒ Object
:nodoc:
      36 37 38  | 
    
      # File 'lib/rubygems/remote_fetcher.rb', line 36 def to_s # :nodoc: "#{super} (#{uri})" end  |