1
0
mirror of https://github.com/danog/amp.git synced 2024-12-13 01:47:33 +01:00
amp/lib/CombinatorException.php
Niklas Keller 7046ca47e1 Expose combined exceptions in combinator exception
Also fix indent, escape sequences and docs
2016-03-09 14:09:15 +01:00

25 lines
610 B
PHP

<?php
namespace Amp;
/**
* CombinatorException is always thrown if multiple promises are combined by combinator functions
* and an exception is thrown.
*/
class CombinatorException extends \RuntimeException {
private $exceptions;
/**
* @param string $message detailed exception message
* @param array $exceptions combined exceptions
*/
public function __construct($message, array $exceptions = []) {
parent::__construct($message, 0, null);
$this->exceptions = $exceptions;
}
public function getExceptions() {
return $this->exceptions;
}
}