-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathECRPException.php
More file actions
28 lines (25 loc) · 905 Bytes
/
ECRPException.php
File metadata and controls
28 lines (25 loc) · 905 Bytes
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
<?php
/**
* Class ECRedPressException
* @author Raphael Titsworth-Morin
*
* Exception to handle ECRedPress errors.
*/
class ECRedPressException extends Exception {
public function __construct($message = "", $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
class ECRedPressRedisParamsException extends ECRedPressException {
public function __construct()
{
parent::__construct("Missing host and/or port. You need to either properly set ECRP_REDIS_URL or pass in a custom config array with REDIS_HOST, REDIS_PORT, and (optionally) REDIS_PASSWORD.", 1);
}
}
class ECRedPressBadConfigException extends ECRedPressException {
public function __construct()
{
parent::__construct("Bad configuration. Take a look at the docs to make sure you are using an appropriate setting and value for it.", 2);
}
}