Merge pull request #12080 from Bo98/unreadableerror-backtrace
exceptions: set backtrace for FormulaUnreadableError
This commit is contained in:
commit
c5ef3dbbe7
@ -208,6 +208,7 @@ class FormulaUnreadableError < FormulaUnavailableError
|
||||
def initialize(name, error)
|
||||
super(name)
|
||||
@formula_error = error
|
||||
set_backtrace(error.backtrace)
|
||||
end
|
||||
end
|
||||
|
||||
@ -257,6 +258,7 @@ class TapFormulaUnreadableError < TapFormulaUnavailableError
|
||||
def initialize(tap, name, error)
|
||||
super(tap, name)
|
||||
@formula_error = error
|
||||
set_backtrace(error.backtrace)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
require "cli/named_args"
|
||||
|
||||
def setup_unredable_formula(name)
|
||||
error = FormulaUnreadableError.new(name, "testing")
|
||||
error = FormulaUnreadableError.new(name, RuntimeError.new("testing"))
|
||||
allow(Formulary).to receive(:factory).with(name, force_bottle: false, flags: []).and_raise(error)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user