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