1 | <?php |
||
38 | class RouterErrorException extends RuntimeException implements Exception |
||
39 | { |
||
40 | const CODE_ITEM_ERROR = 0x100000; |
||
41 | const CODE_SCRIPT_ERROR = 0x200000; |
||
42 | const CODE_READ_ERROR = 0x010000; |
||
43 | const CODE_WRITE_ERROR = 0x020000; |
||
44 | const CODE_EXEC_ERROR = 0x040000; |
||
45 | |||
46 | const CODE_CACHE_ERROR = 0x100001; |
||
47 | const CODE_GET_ERROR = 0x110001; |
||
48 | const CODE_GETALL_ERROR = 0x110002; |
||
49 | const CODE_ADD_ERROR = 0x120001; |
||
50 | const CODE_SET_ERROR = 0x120002; |
||
51 | const CODE_REMOVE_ERROR = 0x120004; |
||
52 | const CODE_SCRIPT_GET_ERROR = 0x210001; |
||
53 | const CODE_SCRIPT_ADD_ERROR = 0x220001; |
||
54 | const CODE_SCRIPT_REMOVE_ERROR = 0x220004; |
||
55 | const CODE_SCRIPT_RUN_ERROR = 0x240001; |
||
56 | |||
57 | /** |
||
58 | * @var ResponseCollection|null The complete response returned by the router. |
||
59 | */ |
||
60 | private $_responses = null; |
||
61 | |||
62 | /** |
||
63 | * Creates a new RouterErrorException. |
||
64 | * |
||
65 | * @param string $message The Exception message to throw. |
||
66 | * @param int $code The Exception code. |
||
67 | * @param E|null $previous The previous exception used for |
||
68 | * the exception chaining. |
||
69 | * @param ResponseCollection|null $responses The complete set responses |
||
70 | * returned by the router. |
||
71 | */ |
||
72 | public function __construct( |
||
81 | |||
82 | /** |
||
83 | * Gets the complete set responses returned by the router. |
||
84 | * |
||
85 | * @return ResponseCollection|null The complete set responses |
||
86 | * returned by the router. |
||
87 | */ |
||
88 | public function getResponses() |
||
92 | |||
93 | // @codeCoverageIgnoreStart |
||
94 | // String representation is not reliable in testing |
||
95 | |||
96 | /** |
||
97 | * Returns a string representation of the exception. |
||
98 | * |
||
99 | * @return string The exception as a string. |
||
100 | */ |
||
101 | public function __toString() |
||
112 | |||
113 | // @codeCoverageIgnoreEnd |
||
114 | } |
||
115 |