From c5ca4df389e4bd30dd1bbb4375557d4b222ba911 Mon Sep 17 00:00:00 2001 From: Art4 Date: Fri, 22 Nov 2024 11:04:04 +0000 Subject: [PATCH] remove try block --- src/App/Router.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/App/Router.php b/src/App/Router.php index 7e11ce727a..31162ec1b6 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -334,17 +334,17 @@ class Router $stamp = microtime(true); - try { - /** @var ICanHandleRequests $module */ - return $this->dice->create($moduleClass, $this->parameters); - } finally { - if ($this->dice_profiler_threshold > 0) { - $dur = floatval(microtime(true) - $stamp); - if ($dur >= $this->dice_profiler_threshold) { - $this->logger->notice('Dice module creation lasts too long.', ['duration' => round($dur, 3), 'module' => $moduleClass, 'parameters' => $this->parameters]); - } + /** @var ICanHandleRequests $module */ + $module = $this->dice->create($moduleClass, $this->parameters); + + if ($this->dice_profiler_threshold > 0) { + $dur = floatval(microtime(true) - $stamp); + if ($dur >= $this->dice_profiler_threshold) { + $this->logger->notice('Dice module creation lasts too long.', ['duration' => round($dur, 3), 'module' => $moduleClass, 'parameters' => $this->parameters]); } } + + return $module; } /**