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.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 5865eb98e..986fdeaa9 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -260,3 +260,24 @@ class ChecksumMismatchError < RuntimeError
super + advice.to_s
end
end
+
+class ResourceMissingError < ArgumentError
+ def initialize formula, resource
+ @formula = formula
+ @resource = resource
+ end
+
+ def to_s
+ "Formula #{@formula} does not define resource \"#{@resource}\"."
+ end
+end
+
+class DuplicateResourceError < ArgumentError
+ def initialize resource
+ @resource = resource
+ end
+
+ def to_s
+ "Resource \"#{@resource}\" defined more than once."
+ end
+end