first commit

This commit is contained in:
rsgrinko committed 2026-08-20 00:49:21 +03:00
commit 8d0bdd2756
9 files changed
+1003

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Rsgrinko\MailService;
use RuntimeException;
/**
* Ошибка при обращении к сервису: сеть не ответила либо API вернуло ошибку.
*/
class MailServiceException extends RuntimeException
{
/** @var array<int, string> Ошибки валидации, если сервис их прислал */
public array $errors = [];
/** @var array<string, mixed> Полный ответ сервиса */
public array $response = [];
/**
* @param array<int, string> $errors
* @param array<string, mixed> $response
*/
public function __construct(string $message, int $code = 0, array $errors = [], array $response = [], ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
$this->errors = $errors;
$this->response = $response;
}
}