mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
Exception - InvalidUrlException - an exception used while url is invalid
This commit is contained in:
23
src/Meritoo/Common/Exception/Regex/InvalidUrlException.php
Normal file
23
src/Meritoo/Common/Exception/Regex/InvalidUrlException.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Meritoo\Common\Exception\Regex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An exception used while url is invalid
|
||||||
|
*
|
||||||
|
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
|
||||||
|
* @copyright Meritoo.pl
|
||||||
|
*/
|
||||||
|
class InvalidUrlException extends \Exception
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Class constructor
|
||||||
|
*
|
||||||
|
* @param string $url Invalid url
|
||||||
|
*/
|
||||||
|
public function __construct($url)
|
||||||
|
{
|
||||||
|
$message = sprintf('Url \'%s\' is invalid. Is there everything ok?', $url);
|
||||||
|
parent::__construct($message);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user