diff options
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index d57f5ddc3..b5299c038 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -22,6 +22,17 @@ class NoSuchKegError < RuntimeError end end +class FormulaValidationError < StandardError + attr_reader :attr + + def initialize(attr, value) + @attr = attr + msg = "invalid attribute: #{attr}" + msg << " (#{value.inspect})" unless value.empty? + super msg + end +end + class FormulaUnavailableError < RuntimeError attr_reader :name attr_accessor :dependent |
