From ac60b5a72bccdd228de7a67dd70accdf2bce2b56 Mon Sep 17 00:00:00 2001 From: Wouter Samaey Date: Fri, 30 Oct 2020 11:52:28 +0100 Subject: [PATCH] Support the logging of Throwables With PHP Strict Types becoming more common, the "Error" class comes in the picture and this does not extend from Exception. --- app/Mage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Mage.php b/app/Mage.php index 360fb12122c..016a49613f1 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -905,9 +905,9 @@ public static function log($message, $level = null, $file = '', $forceLog = fals /** * Write exception to log * - * @param Exception $e + * @param Throwable $e */ - public static function logException(Exception $e) + public static function logException(Throwable $e) { if (!self::getConfig()) { return; @@ -941,9 +941,9 @@ public static function getIsDeveloperMode() /** * Display exception * - * @param Exception $e + * @param Throwable $e */ - public static function printException(Exception $e, $extra = '') + public static function printException(Throwable $e, $extra = '') { if (self::$_isDeveloperMode) { print '
';