PHP 8.2.31
Preview: errors.rb Size: 2.14 KB
//proc/thread-self/root/opt/alt/ruby20/lib64/ruby/2.0.0/rubygems/errors.rb

#--
# This file contains all the various exceptions and other errors that are used
# inside of RubyGems.
#
# DOC: Confirm _all_
#++

module Gem
  ##
  # Raised when RubyGems is unable to load or activate a gem.  Contains the
  # name and version requirements of the gem that either conflicts with
  # already activated gems or that RubyGems is otherwise unable to activate.

  class LoadError < ::LoadError
    # Name of gem
    attr_accessor :name

    # Version requirement of gem
    attr_accessor :requirement
  end

  # FIX: does this need to exist? The subclass is the only other reference
  # I can find.
  class ErrorReason; end

  # Generated when trying to lookup a gem to indicate that the gem
  # was found, but that it isn't usable on the current platform.
  #
  # fetch and install read these and report them to the user to aid
  # in figuring out why a gem couldn't be installed.
  #
  class PlatformMismatch < ErrorReason

    ##
    # the name of the gem
    attr_reader :name

    ##
    # the version
    attr_reader :version

    ##
    # The platforms that are mismatched
    attr_reader :platforms

    def initialize(name, version)
      @name = name
      @version = version
      @platforms = []
    end

    ##
    # append a platform to the list of mismatched platforms.
    #
    # Platforms are added via this instead of injected via the constructor
    # so that we can loop over a list of mismatches and just add them rather
    # than perform some kind of calculation mismatch summary before creation.
    def add_platform(platform)
      @platforms << platform
    end

    ##
    # A wordy description of the error.
    def wordy
      "Found %s (%s), but was for platform%s %s" %
        [@name,
         @version,
         @platforms.size == 1 ? '' : 's',
         @platforms.join(' ,')]
    end
  end

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

  class SourceFetchProblem < ErrorReason
    def initialize(source, error)
      @source = source
      @error = error
    end

    attr_reader :source, :error

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

Directory Contents

Dirs: 6 × Files: 53

Name Size Perms Modified Actions
commands DIR
- drwxr-xr-x 2024-03-03 22:43:42
Edit Download
core_ext DIR
- drwxr-xr-x 2024-03-03 22:43:42
Edit Download
ext DIR
- drwxr-xr-x 2024-03-03 22:43:42
Edit Download
package DIR
- drwxr-xr-x 2024-03-03 22:43:42
Edit Download
security DIR
- drwxr-xr-x 2024-03-03 22:43:42
Edit Download
ssl_certs DIR
- drwxr-xr-x 2024-03-03 22:43:42
Edit Download
1.56 KB lrw-r--r-- 2013-03-17 14:51:53
Edit Download
13.43 KB lrw-r--r-- 2012-11-30 16:27:52
Edit Download
5.27 KB lrw-r--r-- 2012-12-06 05:26:46
Edit Download
1.58 KB lrw-r--r-- 2013-02-05 21:06:14
Edit Download
11.82 KB lrw-r--r-- 2023-07-26 14:06:15
Edit Download
2.76 KB lrw-r--r-- 2013-07-22 16:33:18
Edit Download
7.74 KB lrw-r--r-- 2012-12-23 00:35:09
Edit Download
12.36 KB lrw-r--r-- 2013-11-13 02:59:08
Edit Download
5.53 KB lrw-r--r-- 2013-03-17 14:51:53
Edit Download
14.97 KB lrw-r--r-- 2013-07-22 16:33:18
Edit Download
1.73 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
2.86 KB lrw-r--r-- 2013-01-04 07:31:57
Edit Download
2.14 KB lrw-r--r-- 2013-07-22 16:33:18
Edit Download
2.70 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
416 B lrw-r--r-- 2012-12-10 00:40:39
Edit Download
2.84 KB lrw-r--r-- 2013-09-15 14:23:26
Edit Download
1.98 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
12.89 KB lrw-r--r-- 2012-12-06 05:26:46
Edit Download
22.19 KB lrw-r--r-- 2013-08-16 15:35:06
Edit Download
4.28 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
281 B lrw-r--r-- 2012-11-29 06:52:18
Edit Download
5.09 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
3.36 KB lrw-r--r-- 2011-07-27 01:40:07
Edit Download
1.35 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
1.96 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
13.22 KB lrw-r--r-- 2023-07-26 14:06:15
Edit Download
3.77 KB lrw-r--r-- 2013-08-16 15:35:06
Edit Download
1.58 KB lrw-r--r-- 2012-11-30 00:23:15
Edit Download
5.63 KB lrw-r--r-- 2013-07-22 16:33:18
Edit Download
249 B lrw-r--r-- 2013-07-25 15:42:22
Edit Download
763 B lrw-r--r-- 2013-07-22 16:33:18
Edit Download
7.75 KB lrw-r--r-- 2013-03-17 14:51:53
Edit Download
15.99 KB lrw-r--r-- 2015-08-18 13:01:02
Edit Download
3.67 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
6.02 KB lrw-r--r-- 2012-11-30 16:27:52
Edit Download
1.11 KB lrw-r--r-- 2023-07-26 14:06:15
Edit Download
20.56 KB lrw-r--r-- 2013-03-17 15:01:47
Edit Download
21.69 KB lrw-r--r-- 2013-10-26 17:44:33
Edit Download
3.12 KB lrw-r--r-- 2013-10-26 17:44:33
Edit Download
1.22 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
1.88 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
552 B lrw-r--r-- 2012-11-29 06:52:18
Edit Download
66.90 KB lrw-r--r-- 2023-07-26 14:06:15
Edit Download
5.17 KB lrw-r--r-- 2013-10-26 17:44:33
Edit Download
2.07 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
28.09 KB lrw-r--r-- 2013-07-25 15:42:22
Edit Download
4.03 KB lrw-r--r-- 2013-03-17 15:07:00
Edit Download
1.23 KB lrw-r--r-- 2011-07-27 01:40:07
Edit Download
8.29 KB lrw-r--r-- 2012-12-19 07:19:10
Edit Download
11.44 KB lrw-r--r-- 2012-11-29 06:52:18
Edit Download
4.08 KB lrw-r--r-- 2012-12-23 00:35:09
Edit Download
10.50 KB lrw-r--r-- 2013-10-26 17:44:33
Edit Download
1.59 KB lrw-r--r-- 2011-07-27 01:40:07
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).