From cfc65f0d3b858d076c88ef55ce0f26b2e2e8faf9 Mon Sep 17 00:00:00 2001 From: kiat ng Date: Wed, 28 Sep 2022 09:51:55 +0800 Subject: [PATCH] Convert Exception to Throwable in Mage_Core_Block_Template. --- app/code/core/Mage/Core/Block/Template.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/Core/Block/Template.php b/app/code/core/Mage/Core/Block/Template.php index cfdb1d0d785..43acf9dcba5 100644 --- a/app/code/core/Mage/Core/Block/Template.php +++ b/app/code/core/Mage/Core/Block/Template.php @@ -259,9 +259,12 @@ public function fetchView($fileName) $thisClass = get_class($this); Mage::log('Not valid template file:' . $fileName . ' class: ' . $thisClass, Zend_Log::CRIT, null, true); } - } catch (Exception $e) { + } catch (Throwable $e) { ob_get_clean(); - throw $e; + if (Mage::getIsDeveloperMode()) { + throw $e; + } + Mage::logException($e); } if ($hints) {