-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExceptions.php
40 lines (30 loc) · 877 Bytes
/
Exceptions.php
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
<?php
/**
* @file Exceptions.php
* @author Gabriele Tozzi <[email protected]>
* @package DoPhp
* @brief Common exception clsses.
* Most exceptions are file-specific but general ones are defined here
*/
namespace dophp;
/**
* Exception thrown by DoPhp when DoPhp instance is required but not inited
* @see \DoPhp
*/
class DoPhpNotInitedException extends \LogicException {
/** The exception message when usign a static method without instance */
const INSTANCE_ERROR = 'Must instatiate DoPhp first';
public function __construct() {
parent::__construct(self::INSTANCE_ERROR);
}
}
/**
* Exception thrown when an error is handled and "converted" into an Exception
*/
class PHPErrorException extends \Exception {
}
/**
* Exception thrown when some program logic is missing to handle the case
*/
class NotImplementedException extends \LogicException {
}