Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CompositeException.php

class CompositeException

Represents an exception that is a composite of one or more other exceptions.

This exception is useful in situations where a promise must be rejected with multiple exceptions. It is used for example to reject the returned promise from `some()` and `any()` when too many input promises reject.

Hierarchy

  • class \React\Promise\Exception\CompositeException extends \React\Promise\Exception\Exception

Expanded class hierarchy of CompositeException

1 file declares its use of CompositeException
functions.php in vendor/react/promise/src/functions.php

File

vendor/react/promise/src/Exception/CompositeException.php, line 12

Namespace

React\Promise\Exception
View source
class CompositeException extends \Exception {
    
    /** @var \Throwable[] */
    private $throwables;
    
    /** @param \Throwable[] $throwables */
    public function __construct(array $throwables, string $message = '', int $code = 0, ?\Throwable $previous = null) {
        parent::__construct($message, $code, $previous);
        $this->throwables = $throwables;
    }
    
    /**
     * @return \Throwable[]
     */
    public function getThrowables() : array {
        return $this->throwables;
    }

}

Members

Title Sort descending Modifiers Object type Summary
CompositeException::$throwables private property @var \Throwable[]
CompositeException::getThrowables public function
CompositeException::__construct public function
RSS feed
Powered by Drupal