AggregateException.php 413 B

12345678910111213141516171819
  1. <?php
  2. declare(strict_types=1);
  3. namespace GuzzleHttp\Promise;
  4. /**
  5. * Exception thrown when too many errors occur in the some() or any() methods.
  6. */
  7. class AggregateException extends RejectionException
  8. {
  9. public function __construct(string $msg, array $reasons)
  10. {
  11. parent::__construct(
  12. $reasons,
  13. sprintf('%s; %d rejected promises', $msg, count($reasons))
  14. );
  15. }
  16. }