Use Throwable instead of \Exception

[MAILPOET-4463]
This commit is contained in:
John Oleksowicz
2022-09-12 12:55:00 -05:00
committed by Jan Jakeš
parent 2c2f15a562
commit 8cbbe5aa6e
3 changed files with 9 additions and 8 deletions

View File

@@ -124,14 +124,14 @@ class StepHandler {
try {
$this->stepRunners[$stepType]->run($step, $workflow, $workflowRun);
$log->markCompletedSuccessfully();
} catch (\Exception $e) {
} catch (Throwable $e) {
$log->markFailed();
$log->addError($e);
throw $e;
} finally {
try {
$this->hooks->doWorkflowStepAfterRun($log);
} catch (Exception $e) {
} catch (Throwable $e) {
$log->addError($e);
}
$this->workflowRunLogStorage->createWorkflowRunLog($log);