refactor: add custom Exception class

This commit is contained in:
Maël Gangloff
2025-10-07 15:55:17 +02:00
parent 79589e63eb
commit ea1df9d97a
10 changed files with 109 additions and 37 deletions

View File

@@ -0,0 +1,11 @@
<?php
namespace App\Exception;
class DomainNotFoundException extends \Exception
{
public static function fromDomain(string $ldhName): DomainNotFoundException
{
return new DomainNotFoundException("The domain name $ldhName is not present in the WHOIS database");
}
}