Skip to content

Commit ffe3027

Browse files
committed
throwable php7 | php5
1 parent 292552b commit ffe3027

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Consumer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@ public function invoke(Envelope $envelope, Queue $queue)
135135

136136
$this->dispatcher->dispatch(BernardEvents::ACKNOWLEDGE, new EnvelopeEvent($envelope, $queue));
137137

138-
} catch (\Exception $exception) {
139-
$this->rejectDispatch($exception, $envelope, $queue);
140138
} catch (\Throwable $error) {
139+
// php 7
141140
$this->rejectDispatch($error, $envelope, $queue);
141+
} catch (\Exception $exception) {
142+
// php 5
143+
$this->rejectDispatch($exception, $envelope, $queue);
142144
}
143145
}
144146

0 commit comments

Comments
 (0)