class Gem::Exception < RuntimeError
attr_accessor :source_exception
end
class Gem::CommandLineError < Gem::Exception; end
class Gem::DependencyError < Gem::Exception; end
class Gem::DependencyRemovalException < Gem::Exception; end
class Gem::GemNotInHomeException < Gem::Exception
attr_accessor :spec
end
class Gem::DocumentError < Gem::Exception; end
class Gem::EndOfYAMLException < Gem::Exception; end
class Gem::FilePermissionError < Gem::Exception
attr_reader :directory
def initialize directory
@directory = directory
super "You don't have write permissions for the #{directory} directory."
end
end
class Gem::FormatException < Gem::Exception
attr_accessor :file_path
end
class Gem::GemNotFoundException < Gem::Exception; end
class Gem::SpecificGemNotFoundException < Gem::GemNotFoundException
def initialize(name, version, errors=nil)
super "Could not find a valid gem '#{name}' (#{version}) locally or in a repository"
@name = name
@version = version
@errors = errors
end
attr_reader :name, :version, :errors
end
class Gem::InstallError < Gem::Exception; end
class Gem::InvalidSpecificationException < Gem::Exception; end
class Gem::OperationNotSupportedError < Gem::Exception; end
class Gem::RemoteError < Gem::Exception; end
class Gem::RemoteInstallationCancelled < Gem::Exception; end
class Gem::RemoteInstallationSkipped < Gem::Exception; end
class Gem::RemoteSourceException < Gem::Exception; end
class Gem::VerificationError < Gem::Exception; end
class Gem::SystemExitException < SystemExit
attr_accessor :exit_code
def initialize(exit_code)
@exit_code = exit_code
super "Exiting RubyGems with exit_code #{exit_code}"
end
end