Files
Lesstime/src/Mail/Exception/MailProviderException.php

21 lines
505 B
PHP

<?php
declare(strict_types=1);
namespace App\Mail\Exception;
use RuntimeException;
final class MailProviderException extends RuntimeException
{
public static function connectionFailed(string $reason): self
{
return new self(sprintf('Mail provider connection failed: %s', $reason));
}
public static function operationFailed(string $operation, string $reason): self
{
return new self(sprintf('Mail provider operation "%s" failed: %s', $operation, $reason));
}
}