mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-08 16:23:12 +08:00
Created service to resolve IP locations
This commit is contained in:
10
module/Common/src/Exception/WrongIpException.php
Normal file
10
module/Common/src/Exception/WrongIpException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Shlinkio\Shlink\Common\Exception;
|
||||
|
||||
class WrongIpException extends RuntimeException
|
||||
{
|
||||
public static function fromIpAddress($ipAddress, \Exception $prev = null)
|
||||
{
|
||||
return new self(sprintf('Provided IP "%s" is invalid', $ipAddress), 0, $prev);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user