mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 01:33:11 +08:00
Moved WrongIpException to IpGeolocation module
This commit is contained in:
17
module/IpGeolocation/src/Exception/WrongIpException.php
Normal file
17
module/IpGeolocation/src/Exception/WrongIpException.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user