mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: add custom Exception class
This commit is contained in:
11
src/Exception/DomainNotFoundException.php
Normal file
11
src/Exception/DomainNotFoundException.php
Normal 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user