aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/exceptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/exceptions.rb')
-rw-r--r--lib/rubygems/exceptions.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/rubygems/exceptions.rb b/lib/rubygems/exceptions.rb
index b34bc718ff..c37507c62a 100644
--- a/lib/rubygems/exceptions.rb
+++ b/lib/rubygems/exceptions.rb
@@ -13,7 +13,10 @@ class Gem::DependencyRemovalException < Gem::Exception; end
##
# Raised when attempting to uninstall a gem that isn't in GEM_HOME.
-class Gem::GemNotInHomeException < Gem::Exception; end
+
+class Gem::GemNotInHomeException < Gem::Exception
+ attr_accessor :spec
+end
class Gem::DocumentError < Gem::Exception; end
@@ -65,3 +68,17 @@ class Gem::RemoteSourceException < Gem::Exception; end
class Gem::VerificationError < Gem::Exception; end
+##
+# Raised to indicate that a system exit should occur with the specified
+# exit_code
+
+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