aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 841cc8b39..d49630e0e 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -98,6 +98,17 @@ class TapUnavailableError < RuntimeError
end
end
+class TapPinStatusError < RuntimeError
+ attr_reader :name, :pinned
+
+ def initialize name, pinned
+ @name = name
+ @pinned = pinned
+
+ super pinned ? "#{name} is already pinned." : "#{name} is already unpinned."
+ end
+end
+
class OperationInProgressError < RuntimeError
def initialize(name)
message = <<-EOS.undent