class Bundler::BundlerError - bundler-1.15.4 Documentation

# class Bundler::BundlerError

### Public Class Methods

all_errors() click to toggle source

    # File lib/bundler/errors.rb, line 13
    def self.all_errors
      @all_errors ||= {}
    end

status_code(code) click to toggle source

    # File lib/bundler/errors.rb, line 3
    def self.status_code(code)
      define_method(:status_code) { code }
      if match = BundlerError.all_errors.find {|_k, v| v == code }
        error, _ = match
        raise ArgumentError,
          "Trying to register #{self} for status code #{code} but #{error} is already registered"
      end
      BundlerError.all_errors[self] = code
    end