aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/exceptions.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-20 01:33:19 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-20 01:33:19 +0000
commit3f15d35f83dc91e1e5af6d98e6f6fcd52abd1649 (patch)
treef677f8d0bff97ded1c0995f27158fb91d32966dd /lib/rubygems/exceptions.rb
parent8552f7aa680e1f1a31d76dc9038d80248a445960 (diff)
downloadruby-3f15d35f83dc91e1e5af6d98e6f6fcd52abd1649.tar.gz
* lib/rubygems: Update RubyGems to master 0886307. This commit
improves documentation and should bring ruby above 75% documented on rubyci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/exceptions.rb')
-rw-r--r--lib/rubygems/exceptions.rb43
1 files changed, 42 insertions, 1 deletions
diff --git a/lib/rubygems/exceptions.rb b/lib/rubygems/exceptions.rb
index 9aef89956e..30d9880d8a 100644
--- a/lib/rubygems/exceptions.rb
+++ b/lib/rubygems/exceptions.rb
@@ -81,7 +81,16 @@ end
class Gem::GemNotFoundException < Gem::Exception; end
+##
+# Raised by the DependencyInstaller when a specific gem cannot be found
+
class Gem::SpecificGemNotFoundException < Gem::GemNotFoundException
+
+ ##
+ # Creates a new SpecificGemNotFoundException for a gem with the given +name+
+ # and +version+. Any +errors+ encountered when attempting to find the gem
+ # are also stored.
+
def initialize(name, version, errors=nil)
super "Could not find a valid gem '#{name}' (#{version}) locally or in a repository"
@@ -90,7 +99,21 @@ class Gem::SpecificGemNotFoundException < Gem::GemNotFoundException
@errors = errors
end
- attr_reader :name, :version, :errors
+ ##
+ # The name of the gem that could not be found.
+
+ attr_reader :name
+
+ ##
+ # The version of the gem that could not be found.
+
+ attr_reader :version
+
+ ##
+ # Errors encountered attempting to find the gem.
+
+ attr_reader :errors
+
end
##
@@ -160,6 +183,9 @@ class Gem::RemoteSourceException < Gem::Exception; end
class Gem::RubyVersionMismatch < Gem::Exception; end
+##
+# Raised by Gem::Validator when something is not right in a gem.
+
class Gem::VerificationError < Gem::Exception; end
##
@@ -167,8 +193,15 @@ class Gem::VerificationError < Gem::Exception; end
# exit_code
class Gem::SystemExitException < SystemExit
+
+ ##
+ # The exit code for the process
+
attr_accessor :exit_code
+ ##
+ # Creates a new SystemExitException with the given +exit_code+
+
def initialize(exit_code)
@exit_code = exit_code
@@ -183,8 +216,16 @@ end
class Gem::UnsatisfiableDependencyError < Gem::Exception
+ ##
+ # The unsatisfiable dependency. This is a
+ # Gem::DependencyResolver::DependencyRequest, not a Gem::Dependency
+
attr_reader :dependency
+ ##
+ # Creates a new UnsatisfiableDepedencyError for the unsatisfiable
+ # Gem::DependencyResolver::DependencyRequest +dep+
+
def initialize dep
requester = dep.requester ? dep.requester.request : '(unknown)'