Skip to content

Commit

Permalink
Merge pull request #172 from prooph/bugfix/handle_throwable
Browse files Browse the repository at this point in the history
Catch throwable and reset isDispatching
  • Loading branch information
codeliner authored Oct 23, 2017
2 parents af0dae2 + b461530 commit 07cc9de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/CommandBus.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function dispatch($command)
} catch (\Exception $e) {
$this->isDispatching = false;
throw CommandDispatchException::wrap($e, $this->commandQueue);
} catch (\Throwable $e) {
$this->isDispatching = false;
throw $e;
}
}
}
Expand Down

0 comments on commit 07cc9de

Please sign in to comment.