Stop rescuing NameError
This clause originated in 4a36c56ac7b36904712aa472b9bd50ef1b0c80d3, attempting to catch NameErrors raised by const_defined? calls earlier in the method body. Those const_defined? calls have since been moved out of the body of the begin block. Stop rescuing NameError here, which will make true programming errors in formulae easier to debug.
This commit is contained in:
parent
86ec8fcff3
commit
2cb160dc46
@ -74,11 +74,7 @@ class Formulary
|
||||
STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
|
||||
begin
|
||||
require(path)
|
||||
rescue NoMethodError
|
||||
# This is a programming error in an existing formula, and should not
|
||||
# have a "no such formula" message.
|
||||
raise
|
||||
rescue LoadError, NameError => e
|
||||
rescue LoadError => e
|
||||
raise FormulaUnavailableError, name, e.backtrace
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user