@@ -63,8 +63,10 @@ discard block |
||
63 | 63 | $consumer = $this->container->get(Consumer::class); |
64 | 64 | $worker = $this->container->get(Worker::class); |
65 | 65 | |
66 | - $consumer->serve($worker, function (\Throwable $e = null) { |
|
67 | - if ($e !== null) { |
|
66 | + $consumer->serve($worker, function (\Throwable $e = null) |
|
67 | + { |
|
68 | + if ($e !== null) |
|
69 | + { |
|
68 | 70 | $this->handleException($e); |
69 | 71 | } |
70 | 72 | |
@@ -77,9 +79,12 @@ discard block |
||
77 | 79 | */ |
78 | 80 | protected function handleException(\Throwable $e) |
79 | 81 | { |
80 | - try { |
|
82 | + try |
|
83 | + { |
|
81 | 84 | $this->container->get(SnapshotterInterface::class)->register($e); |
82 | - } catch (\Throwable|ContainerExceptionInterface $se) { |
|
85 | + } |
|
86 | + catch (\Throwable|ContainerExceptionInterface $se) |
|
87 | + { |
|
83 | 88 | // no need to notify when unable to register an exception |
84 | 89 | } |
85 | 90 | } |