mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 09:13:11 +08:00
18 lines
443 B
PHP
18 lines
443 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\IpGeolocation\Exception;
|
|
|
|
use Shlinkio\Shlink\Common\Exception\RuntimeException;
|
|
use Throwable;
|
|
|
|
use function sprintf;
|
|
|
|
class WrongIpException extends RuntimeException implements ExceptionInterface
|
|
{
|
|
public static function fromIpAddress($ipAddress, ?Throwable $prev = null): self
|
|
{
|
|
return new self(sprintf('Provided IP "%s" is invalid', $ipAddress), 0, $prev);
|
|
}
|
|
}
|