@@ -201,9 +201,12 @@ discard block |
||
201 | 201 | $handler = new ConsoleHandler(); |
202 | 202 | $handler->setColorsSupport(true); |
203 | 203 | |
204 | - try { |
|
204 | + try |
|
205 | + { |
|
205 | 206 | $this->makeException(); |
206 | - } catch (\Throwable $e) { |
|
207 | + } |
|
208 | + catch (\Throwable $e) |
|
209 | + { |
|
207 | 210 | } |
208 | 211 | |
209 | 212 | $result = $handler->renderException($e, HandlerInterface::VERBOSITY_DEBUG); |
@@ -217,9 +220,12 @@ discard block |
||
217 | 220 | { |
218 | 221 | $handler = new PlainHandler(); |
219 | 222 | |
220 | - try { |
|
223 | + try |
|
224 | + { |
|
221 | 225 | $this->makeException(); |
222 | - } catch (\Throwable $e) { |
|
226 | + } |
|
227 | + catch (\Throwable $e) |
|
228 | + { |
|
223 | 229 | } |
224 | 230 | |
225 | 231 | $result = $handler->renderException($e, HandlerInterface::VERBOSITY_DEBUG); |
@@ -232,9 +238,12 @@ discard block |
||
232 | 238 | { |
233 | 239 | $handler = new JsonHandler(); |
234 | 240 | |
235 | - try { |
|
241 | + try |
|
242 | + { |
|
236 | 243 | $this->makeException(); |
237 | - } catch (\Throwable $e) { |
|
244 | + } |
|
245 | + catch (\Throwable $e) |
|
246 | + { |
|
238 | 247 | } |
239 | 248 | |
240 | 249 | $result = $handler->renderException($e, HandlerInterface::VERBOSITY_DEBUG); |
@@ -249,9 +258,12 @@ discard block |
||
249 | 258 | |
250 | 259 | $handler = new HtmlHandler(HtmlHandler::DEFAULT); |
251 | 260 | |
252 | - try { |
|
261 | + try |
|
262 | + { |
|
253 | 263 | $this->makeException(); |
254 | - } catch (\Throwable $e) { |
|
264 | + } |
|
265 | + catch (\Throwable $e) |
|
266 | + { |
|
255 | 267 | } |
256 | 268 | |
257 | 269 | $result = $handler->renderException($e, HandlerInterface::VERBOSITY_DEBUG); |
@@ -267,9 +279,12 @@ discard block |
||
267 | 279 | |
268 | 280 | $handler = new HtmlHandler(HtmlHandler::INVERTED); |
269 | 281 | |
270 | - try { |
|
282 | + try |
|
283 | + { |
|
271 | 284 | $this->makeException(); |
272 | - } catch (\Throwable $e) { |
|
285 | + } |
|
286 | + catch (\Throwable $e) |
|
287 | + { |
|
273 | 288 | } |
274 | 289 | |
275 | 290 | $result = $handler->renderException($e, HandlerInterface::VERBOSITY_DEBUG); |
@@ -281,13 +296,16 @@ discard block |
||
281 | 296 | |
282 | 297 | public function makeException(): void |
283 | 298 | { |
284 | - try { |
|
299 | + try |
|
300 | + { |
|
285 | 301 | $f = function (): void { |
286 | 302 | throw new \RuntimeException('error'); |
287 | 303 | }; |
288 | 304 | |
289 | 305 | $f(); |
290 | - } catch (\Throwable $e) { |
|
306 | + } |
|
307 | + catch (\Throwable $e) |
|
308 | + { |
|
291 | 309 | throw new \LogicException('error', 0, $e); |
292 | 310 | } |
293 | 311 | } |