formulary: catch argument errors.

Reraise as a `FormulaUnreadableError` as these are formulae that have
mistakes that cannot be trivially repaired.

Fixes #4475.
Fixes #4476.
This commit is contained in:
Mike McQuaid 2018-07-15 17:03:50 +01:00
parent bd5131d710
commit 0990fbaac4

View File

@ -24,7 +24,7 @@ module Formulary
const_set(namespace, mod)
begin
mod.module_eval(contents, path)
rescue ScriptError => e
rescue ArgumentError, ScriptError => e
raise FormulaUnreadableError.new(name, e)
end
class_name = class_s(name)