Created service to resolve IP locations

This commit is contained in:
Alejandro Celaya
2016-07-20 12:37:48 +02:00
parent 06fa33877b
commit d3c2f4ed2a
3 changed files with 63 additions and 0 deletions

View 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);
}
}