@@ -58,20 +58,30 @@ |
||
58 | 58 | */ |
59 | 59 | public function process(Request $request, Handler $handler): Response |
60 | 60 | { |
61 | - try { |
|
61 | + try |
|
62 | + { |
|
62 | 63 | return $handler->handle($request); |
63 | - } catch (ClientException | RouterException $e) { |
|
64 | - if ($e instanceof ClientException) { |
|
64 | + } |
|
65 | + catch (ClientException | RouterException $e) |
|
66 | + { |
|
67 | + if ($e instanceof ClientException) |
|
68 | + { |
|
65 | 69 | $code = $e->getCode(); |
66 | - } else { |
|
70 | + } |
|
71 | + else |
|
72 | + { |
|
67 | 73 | $code = 404; |
68 | 74 | } |
69 | - } catch (\Throwable $e) { |
|
70 | - if (!$this->suppressErrors) { |
|
75 | + } |
|
76 | + catch (\Throwable $e) |
|
77 | + { |
|
78 | + if (!$this->suppressErrors) |
|
79 | + { |
|
71 | 80 | throw $e; |
72 | 81 | } |
73 | 82 | |
74 | - if ($this->snapshots !== null) { |
|
83 | + if ($this->snapshots !== null) |
|
84 | + { |
|
75 | 85 | $this->snapshots->register($e); |
76 | 86 | } |
77 | 87 |