Skip to content

Commit 5dee1c0

Browse files
authored
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.
1 parent 7c1835b commit 5dee1c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/Mage.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -905,9 +905,9 @@ public static function log($message, $level = null, $file = '', $forceLog = fals
905905
/**
906906
* Write exception to log
907907
*
908-
* @param Exception $e
908+
* @param Throwable $e
909909
*/
910-
public static function logException(Exception $e)
910+
public static function logException(Throwable $e)
911911
{
912912
if (!self::getConfig()) {
913913
return;
@@ -941,9 +941,9 @@ public static function getIsDeveloperMode()
941941
/**
942942
* Display exception
943943
*
944-
* @param Exception $e
944+
* @param Throwable $e
945945
*/
946-
public static function printException(Exception $e, $extra = '')
946+
public static function printException(Throwable $e, $extra = '')
947947
{
948948
if (self::$_isDeveloperMode) {
949949
print '<pre>';

0 commit comments

Comments
 (0)