aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorXu Cheng2015-11-07 16:01:05 +0800
committerXu Cheng2015-11-09 15:34:20 +0800
commit889bb5fb037273135dbc1b2c14c08ecc0162b64f (patch)
treeb8d36652ba6e6539ea4753758f1dc10e083101e2 /Library/Homebrew
parent4e196a23483799ce114169b8b07cb3e195c107d3 (diff)
downloadbrew-889bb5fb037273135dbc1b2c14c08ecc0162b64f.tar.bz2
exceptions: add TapAlreadyTappedError
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/exceptions.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 3791762c0..23c227825 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -119,6 +119,18 @@ class TapUnavailableError < RuntimeError
end
end
+class TapAlreadyTappedError < RuntimeError
+ attr_reader :name
+
+ def initialize(name)
+ @name = name
+
+ super <<-EOS.undent
+ Tap #{name} already tapped.
+ EOS
+ end
+end
+
class TapPinStatusError < RuntimeError
attr_reader :name, :pinned