3 * PHPwikiBot Exceptions
6 * @name Exception Definitions
7 * @license http://www.gnu.org/licenses/gpl.html GPLv3+
12 * BotException returns has additional function getException() which returns the exception in HTTP header style
13 * e.g. 100 Can't Login. Also include some errors:
19 class BotException extends Exception {
22 * getException method returns the exception in HTTP header style
23 * @return string An HTTP header style error code
25 final public function getException() {
26 return $this->code.' '.$this->message;
30 * The exception Login Failure (1xx)
37 class LoginFailure extends BotException {}
40 * The exception Get Page Failure (2xx)
43 * + 200 Can't Fetch Page
44 * + 201 Page doesn't exist
45 * + 202 Page title invaild
50 class GetPageFailure extends BotException {}
53 * The exception Get Information Failure (3xx)
56 * + 300 Can't Get Info
57 * + 301 Not in Gereral Info
61 class InfoFailure extends BotException {}
65 * The exception Edit Failure (4xx)
76 * + 421 Page Doesn't Exist
80 class EditFailure extends BotException {}
83 * The exception Move Failure (5xx)
87 * + 501 Destination Exists
90 * + 504 Extension Mismatch
91 * + 505 Wrong Namespace
97 class MoveFailure extends BotException {}
100 * The exception Delete Failure (6xx)
103 * + 600 Delete Failure
107 * + 604 Invaild Title
111 class DeleteFailure extends BotException {}
114 * The exception Protect Failure (7xx)
117 * + 700 Protect Failure
121 * + 704 Invaild Title
122 * + 705 Invaild Expiry
124 * + 707 Invaild Level
129 class ProtectFailure extends BotException {}
132 * The exception Upload Failure (8xx)
135 * + 800 Upload Failure
136 * + 801 Can't Fetch File
137 * + 802 Can't Read File
143 class UploadFailure extends BotException {}
146 * The exception Delete Failure (9xx)
149 * + 900 Undelete Failure
153 * + 904 Invaild Title
157 class UndeleteFailure extends BotException {}
160 * The exception Block Failure (10xx)
163 * + 1000 Block Failure
164 * + 1001 Already Blocked
167 * + 1004 Invaild Expiry
168 * + 1005 Invaild User/IP
169 * + 1006 Unblock Failure
174 class BlockFailure extends BotException {}
177 * The exception Email Failure (11xx)
180 * + 1100 Email Failure
181 * + 1101 Don't want email
187 class EmailFailure extends BotException {}
190 * The exception Import Failure (12xx)
193 * + 1200 Import Failure
194 * + 1201 Wrong Interwiki
195 * + 1202 Upload Failure
198 * + 1205 Server Fault
202 class ImportFailure extends BotException {}
204 //class LoginFailure extends BotException {}*/