Conecciones de Promociones

This commit is contained in:
Juan Pablo Vial
2025-04-03 13:15:56 -03:00
parent ced673e452
commit 8a1e6a7761
17 changed files with 1144 additions and 79 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace Incoviba\Exception;
use Exception;
use Throwable;
class AggregateException extends Exception
{
public function __construct(array $exceptions, ?Throwable $previous = null)
{
$code = count($exceptions);
$temp_arr = array_reverse($exceptions);
$current = array_shift($temp_arr);
$current->previous = $previous;
foreach ($temp_arr as $exception) {
$exception->previous = $current;
$current = $exception;
}
$message = "Aggregate Exception";
parent::__construct($message, $code, $current);
}
}