Skip to content

Commit

Permalink
Fixing error in consume catchException
Browse files Browse the repository at this point in the history
Also added throwables support

Signed-off-by: RJ Garcia <rj@bighead.net>
  • Loading branch information
ragboyjr committed Jun 3, 2017
1 parent c7c6711 commit a2370a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Unreleased

### Added

- Support for php7 throwables in catching exceptions

### Fixed

- Bug in consume where exceptions weren't being caught

## 0.3.3 - 2017-06-02

### Added
Expand Down
4 changes: 3 additions & 1 deletion src/Pipeline/consume.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ function catchExceptionConsume() {
try {
return $next($job);
} catch (\Exception $e) {
return Result::failed(['exception' => $e->getMessage()]);
return Job\failed(['exception' => $e->getMessage()]);
} catch (\Throwable $e) {
return Job\failed(['exception' => $e->getMessage()]);
}
};
}

0 comments on commit a2370a8

Please sign in to comment.