mirror of
https://github.com/ash-project/reactor.git
synced 2024-09-20 05:13:16 +12:00
fix(RunStepError): pass entire step struct instead of just name when raising.
This commit is contained in:
parent
ec9573b2fe
commit
76234423ea
1 changed files with 2 additions and 2 deletions
|
@ -117,7 +117,7 @@ defmodule Reactor.Executor.StepRunner do
|
||||||
|> handle_run_result(reactor, step, arguments, context)
|
|> handle_run_result(reactor, step, arguments, context)
|
||||||
rescue
|
rescue
|
||||||
reason ->
|
reason ->
|
||||||
error = RunStepError.exception(step: step.name, error: reason)
|
error = RunStepError.exception(step: step, error: reason)
|
||||||
Hooks.event(reactor, {:run_error, error}, step, context)
|
Hooks.event(reactor, {:run_error, error}, step, context)
|
||||||
|
|
||||||
maybe_compensate(reactor, step, error, arguments, context)
|
maybe_compensate(reactor, step, error, arguments, context)
|
||||||
|
@ -149,7 +149,7 @@ defmodule Reactor.Executor.StepRunner do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp handle_run_result({:error, reason}, reactor, step, arguments, context) do
|
defp handle_run_result({:error, reason}, reactor, step, arguments, context) do
|
||||||
error = RunStepError.exception(step: step.name, error: reason)
|
error = RunStepError.exception(step: step, error: reason)
|
||||||
Hooks.event(reactor, {:run_error, error}, step, context)
|
Hooks.event(reactor, {:run_error, error}, step, context)
|
||||||
|
|
||||||
maybe_compensate(reactor, step, error, arguments, context)
|
maybe_compensate(reactor, step, error, arguments, context)
|
||||||
|
|
Loading…
Reference in a new issue