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.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 38bb9bf6b..957fc42b9 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -23,11 +23,12 @@ class NoSuchKegError < RuntimeError
end
class FormulaValidationError < StandardError
- attr_reader :attr
+ attr_reader :attr, :formula
- def initialize(attr, value)
+ def initialize(formula, attr, value)
@attr = attr
- super "invalid attribute: #{attr} (#{value.inspect})"
+ @formula = formula
+ super "invalid attribute for formula '#{formula}': #{attr} (#{value.inspect})"
end
end