From 0ef63e5f175537fb01a347dd49b4830e363393d5 Mon Sep 17 00:00:00 2001 From: predakanga Date: Sun, 23 Aug 2020 07:42:05 +1000 Subject: [PATCH] Update ChainException to support Throwables Fixes issue where TypeErrors, etc, would cause an exception without the relevant messages shown --- src/Exception/ChainException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception/ChainException.php b/src/Exception/ChainException.php index ce44b37..2f8ec4a 100755 --- a/src/Exception/ChainException.php +++ b/src/Exception/ChainException.php @@ -34,7 +34,7 @@ final class ChainException extends Exception */ public function __construct(array $exceptions) { - $messages = array_map(function (\Exception $exception) { + $messages = array_map(function (\Throwable $exception) { return sprintf( '%s: %s', get_class($exception),