1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
<?php
/**
* Created by PhpStorm.
* Copyright: Bertschi AG, 2015
* User: jbaumann
* File: ServerConfigException.php
* Date: 23.12.2015
* Time: 14:19
*/
namespace JRA\Exceptions;
use Exception;
class ServerConfigException extends JRAException
{
/**
* The standard exception code if there is not another one specified.
*/
const SERVER_CONFIG_EXCEPTION_UNDEFINED = 57300;
/**
* The exception code if the config was already filled.
*/
const SERVER_CONFIG_EXCEPTION_ALREADY_DEFINED = 57301;
/**
* The exception code if the url is invalid.
*/
const SERVER_CONFIG_EXCEPTION_URL_NOT_VALID = 57302;
/**
* The exception code the give host is invalid.
*/
const SERVER_CONFIG_EXCEPTION_HOST_NOT_VALID = 57303;
/**
* The exception code if the url is undefined.
*/
const SERVER_CONFIG_EXCEPTION_URL_UNDEFINED = 57304;
/**
* ServerConfigException constructor.
*
* @param string $message The exception message.
* @param int $code The exception code.
* @param Exception|null $previous A previous exception.
*/
public function __construct($message = 'Undefined exception message.', $code = ServerConfigException::SERVER_CONFIG_EXCEPTION_UNDEFINED, Exception $previous = null)
{
parent:: __construct('Server Config Exception: ' . $message, $code, $previous);
}
}