aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 79e4c946b..28e79c68f 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -23,8 +23,12 @@ class Formulary
begin
mod.const_get(class_name)
- rescue NameError => e
- raise FormulaUnavailableError, name, e.backtrace
+ rescue NameError => original_exception
+ class_list = mod.constants.
+ map { |const_name| mod.const_get(const_name) }.
+ select { |const| const.is_a?(Class) }
+ e = FormulaClassUnavailableError.new(name, path, class_name, class_list)
+ raise e, "", original_exception.backtrace
end
end