1- <?php namespace CodeIgniter ;
1+ <?php
2+
3+ namespace CodeIgniter ;
24
35/**
46 * CodeIgniter
3537 * @since Version 3.0.0
3638 * @filesource
3739 */
38-
3940/**
4041 * Custom Exceptions
4142 *
42- * These exceptions are provided for you use, and work to provide a consistent
43+ * These exceptions are provided for your use, and work to provide a consistent
4344 * experience across the application. The default error codes are already set,
4445 * and will be used to provide both HTTP status codes and CLI exit codes.
4546 *
47+ * The Error Exceptions below are primarily to provide a way to have
48+ * information logged automatically by the application's log system.
49+ *
4650 * @package CodeIgniter
4751 */
4852
49-
50- /*
51- The Error Exceptions below are primarily to provide a way to have information logged
52- automatically by the application's log system.
53- */
54-
5553/**
56- * Exception for automatic logging.
54+ * Error: system is unusable
5755 */
58- class EmergencyError extends \Error {}; // system is unusable
56+ class EmergencyError extends \Error
57+ {
58+
59+ }
5960
6061/**
61- * Exception for automatic logging.
62+ * Error: Action must be taken immediately (system/db down, etc)
6263 */
63- class AlertError extends \Error {}; // Action must be taken immediately (system/db down, etc)
64+ class AlertError extends \Error
65+ {
66+
67+ }
6468
6569/**
66- * Exception for automatic logging .
70+ * Error: Critical conditions, like component unavailble, etc .
6771 */
68- class CriticalError extends \Error {}; // Critical conditions, like component unavailble, etc.
72+ class CriticalError extends \Error
73+ {
74+
75+ }
6976
7077/**
71- * Exception for automatic logging.
78+ * Error: Runtime errors that do not require immediate action
7279 */
73- class Error extends \Error {}; // Runtime errors that do not require immediate action
80+ class Error extends \Error
81+ {
82+
83+ }
7484
7585/**
7686 * Exception for automatic logging.
7787 */
7888class PageNotFoundException extends \OutOfBoundsException
7989{
90+
8091 /**
8192 * Error code
8293 * @var int
@@ -85,13 +96,12 @@ class PageNotFoundException extends \OutOfBoundsException
8596
8697}
8798
88- ;
89-
9099/**
91100 * Exception for automatic logging.
92101 */
93102class ConfigException extends CriticalError
94103{
104+
95105 /**
96106 * Error code
97107 * @var int
@@ -100,13 +110,12 @@ class ConfigException extends CriticalError
100110
101111}
102112
103- ;
104-
105113/**
106114 * Exception for automatic logging.
107115 */
108116class UnknownFileException extends CriticalError
109117{
118+
110119 /**
111120 * Error code
112121 * @var int
@@ -115,13 +124,12 @@ class UnknownFileException extends CriticalError
115124
116125}
117126
118- ;
119-
120127/**
121128 * Exception for automatic logging.
122129 */
123130class UnknownClassException extends CriticalError
124131{
132+
125133 /**
126134 * Error code
127135 * @var int
@@ -130,13 +138,12 @@ class UnknownClassException extends CriticalError
130138
131139}
132140
133- ;
134-
135141/**
136142 * Exception for automatic logging.
137143 */
138144class UnknownMethodException extends CriticalError
139145{
146+
140147 /**
141148 * Error code
142149 * @var int
@@ -145,13 +152,12 @@ class UnknownMethodException extends CriticalError
145152
146153}
147154
148- ;
149-
150155/**
151156 * Exception for automatic logging.
152157 */
153158class UserInputException extends \OutOfBoundsException
154159{
160+
155161 /**
156162 * Error code
157163 * @var int
@@ -160,19 +166,16 @@ class UserInputException extends \OutOfBoundsException
160166
161167}
162168
163- ;
164-
165169/**
166170 * Exception for automatic logging.
167171 */
168172class DatabaseException extends Error
169173{
174+
170175 /**
171176 * Error code
172177 * @var int
173178 */
174179 protected $ code = 8 ;
175180
176181}
177-
178- ;
0 commit comments