<?php

declare(strict_types=1);

namespace App\Module\Mail\Domain\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));
    }
}
