Skip to content

Commit

Permalink
Properly Handle Initialization Errors - Fix #1132 (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
hschletz committed May 19, 2024
1 parent 16dd350 commit 1b81af7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Mockery.php
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,8 @@ private static function extractInstancePublicProperties($object, $nesting)
$name = $publicProperty->getName();
try {
$cleanedProperties[$name] = self::cleanupNesting($object->{$name}, $nesting);
} catch (Exception $exception) {
$cleanedProperties[$name] = $exception->getMessage();
} catch (Throwable $throwable) {
$cleanedProperties[$name] = $throwable->getMessage();
}
}
}
Expand Down

0 comments on commit 1b81af7

Please sign in to comment.