Check file existence instead of rescuing LoadError
This commit is contained in:
parent
2cb160dc46
commit
5bf92cd7ca
@ -72,11 +72,8 @@ class Formulary
|
||||
|
||||
def load_file
|
||||
STDERR.puts "#{$0} (#{self.class.name}): loading #{path}" if ARGV.debug?
|
||||
begin
|
||||
raise FormulaUnavailableError.new(name) unless path.file?
|
||||
require(path)
|
||||
rescue LoadError => e
|
||||
raise FormulaUnavailableError, name, e.backtrace
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user