mirror of
https://github.com/shlinkio/shlink.git
synced 2026-10-16 13:51:59 -05:00
11 lines
362 B
PHP
11 lines
362 B
PHP
<?php
|
|||
|
|
namespace Acelaya\UrlShortener\Exception;
|
||
|
|
|
||
|
|
class InvalidUrlException extends RuntimeException
|
||
|
|
{
|
||
|
|
public static function fromUrl($url, \Exception $previous = null)
|
||
|
|
{
|
||
|
|
$code = isset($previous) ? $previous->getCode() : -1;
|
||
|
|
return new static(sprintf('Provided URL "%s" is not an exisitng and valid URL', $url), $code, $previous);
|
||
|
|
}
|
||
|
|
}
|