From 5dee1c0988e5ebd7fb458d6b72163c69a545c53f Mon Sep 17 00:00:00 2001 From: Wouter Samaey Date: Tue, 3 Nov 2020 17:12:34 +0100 Subject: [PATCH] Support the logging of Throwables (#1292) 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 '
';