*/ private array $reasons; /** * @param non-empty-array $reasons Array of exceptions. * @param string|null $message Exception message, defaults to message generated from passed exceptions. * * @psalm-assert non-empty-array $reasons */ public function __construct(array $reasons, ?string $message = null) { parent::__construct($message ?? $this->generateMessage($reasons)); $this->reasons = $reasons; } /** * @return non-empty-array */ public function getReasons(): array { return $this->reasons; } /** * @param non-empty-array $reasons */ private function generateMessage(array $reasons): string { $message = \sprintf( 'Multiple exceptions encountered (%d); use "%s::getReasons()" to retrieve the array of exceptions thrown:', \count($reasons), self::class ); foreach ($reasons as $reason) { $message .= \PHP_EOL . \PHP_EOL . \get_class($reason); if ($reason->getMessage() !== '') { $message .= ': ' . $reason->getMessage(); } } return $message; } } __halt_compiler();----SIGNATURE:----PHdgh3ZkAuMNnTANg++HvbrAQEGwueaVx8kFLN8GvSnjCTacopF9Gy78uBX0RdVN/uV2PFGwddm7LeGCn2uKwYQ36S0OOLpgJmveKU0bvcr3CHyTf1ssVqrhzAx4fMDhcU7nx0FvzO8AEONi4FzNtfDepgadwOC4OTJaZDjkQokS+ha8iBgUj+1w5LBapVCICq3n1YbKvrJfkTOvUTJDR1FZkKJJTy74ZcNGih+ygkDkDslXgK4n77grlJQXhpexIaCtR4x4DCr+hknrfgC6JJdjUume0oLn/tOApkZ99dlHBT19wAV71AxZTJEb5XRkqkkDG6DVcSuVIkhoOb4TWt+ATnynlab0yqZNpFTxf2lEsjlieDxpIA3v7nmTna98hWk+5Ct2oRyvKVsILQbHcUdhVmHfCLptoCXMY11PdnUeywZC9uMRWGWgW2lVeW8gPvCupAyn09DkOhMPCiXANrAm55kfs/q4wlRV6ZoKgmwsq7ezHWGELe0J9JIVAnrD/ZvHLJYP0xgJ1YcMg0/1vJkRf7pWTTNIlnY/MZ3Q1UKOiqjXtoJO0mbZ3rxV07juXBwlk0ncS9fdB3KJN9KXoWpq8AGsBWfWe+snzOSYbskdFzVO7kYscCYMcVP1E8SmwrAg5S1ZYmi7njwBCsYc+VDEpqgAtCtTUAFHVZbzrgE=----ATTACHMENT:----Mzg2NzExNTE2NTAwNDM0MyA3NjMzNDE4NzMxMDQyMzQwIDQwNjM0NTY4MTY5MzI5Njk=