From cad8510daef8083161b4506ca8d130cded2ede87 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Tue, 15 Feb 2022 05:33:21 +0100 Subject: [PATCH] Merge index exceptions with same handling --- index.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.php b/index.php index 5393b8cff..b6b86e1c0 100644 --- a/index.php +++ b/index.php @@ -45,10 +45,7 @@ $grav = Grav::instance(array('loader' => $loader)); // Process the page try { $grav->process(); -} catch (\Error $e) { - $grav->fireEvent('onFatalException', new Event(array('exception' => $e))); - throw $e; -} catch (\Exception $e) { +} catch (\Error|\Exception $e) { $grav->fireEvent('onFatalException', new Event(array('exception' => $e))); throw $e; }