mirror of
https://github.com/danog/amp.git
synced 2025-01-22 21:31:18 +01:00
Remove unused
MultireasonException has been replaced with CompositeException.
This commit is contained in:
parent
bfe8d635b8
commit
b5b40cff9c
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Amp;
|
||||
|
||||
class MultiReasonException extends \Exception
|
||||
{
|
||||
/** @var \Throwable[] */
|
||||
private array $reasons;
|
||||
|
||||
/**
|
||||
* @param \Throwable[] $reasons Array of exceptions rejecting the promise.
|
||||
* @param string|null $message
|
||||
*/
|
||||
public function __construct(array $reasons, string $message = null)
|
||||
{
|
||||
parent::__construct($message ?: "Multiple errors encountered; use "
|
||||
. self::class . "::getReasons() to retrieve the array of exceptions thrown");
|
||||
|
||||
$this->reasons = $reasons;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Throwable[]
|
||||
*/
|
||||
public function getReasons(): array
|
||||
{
|
||||
return $this->reasons;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user