123456789_123456789_123456789_123456789_123456789_

Class: Gem::SourceFetchProblem

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ErrorReason
Instance Chain:
self, ErrorReason
Inherits: Gem::ErrorReason
Defined in: lib/rubygems/errors.rb

Overview

An error that indicates we weren't able to fetch some data from a source

Class Method Summary

Instance Attribute Summary

  • #error (also: #exception) readonly

    The fetch error which is an Exception subclass.

  • #exception readonly

    The “exception” alias allows you to call raise on a SourceFetchProblem.

  • #source readonly

    The source that had the fetch problem.

Instance Method Summary

  • #wordy

    An English description of the error.

Constructor Details

.new(source, error) ⇒ SourceFetchProblem

Creates a new SourceFetchProblem for the given #source and #error.

[ GitHub ]

  
# File 'lib/rubygems/errors.rb', line 111

def initialize(source, error)
  @source = source
  @error = error
end

Instance Attribute Details

#error (readonly) Also known as: #exception

The fetch error which is an Exception subclass.

[ GitHub ]

  
# File 'lib/rubygems/errors.rb', line 124

attr_reader :error

#exception (readonly)

The “exception” alias allows you to call raise on a SourceFetchProblem.

[ GitHub ]

  
# File 'lib/rubygems/errors.rb', line 136

alias exception error

#source (readonly)

The source that had the fetch problem.

[ GitHub ]

  
# File 'lib/rubygems/errors.rb', line 119

attr_reader :source

Instance Method Details

#wordy

An English description of the error.

[ GitHub ]

  
# File 'lib/rubygems/errors.rb', line 129

def wordy
  "Unable to download data from #{@source.uri} - #{@error.message}"
end