Skip to content

Commit

Permalink
Support the logging of Throwables (#1292)
Browse files Browse the repository at this point in the history
With PHP Strict Types becoming more common, the "Error" class comes in the picture and this does not extend from Exception.
  • Loading branch information
woutersamaey committed Nov 3, 2020
1 parent 7c1835b commit 5dee1c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Mage.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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 '<pre>';
Expand Down

0 comments on commit 5dee1c0

Please sign in to comment.