-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.php
More file actions
46 lines (40 loc) · 1.02 KB
/
exceptions.php
File metadata and controls
46 lines (40 loc) · 1.02 KB
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
41
42
43
44
45
46
<?
//Not valid XML
class XMLParseException extends Exception {
}
//Invalid feed type
class WrongFormatException extends Exception {
}
//Critical elements missing while feed parsing
class MalformedFeedException extends Exception {
}
//wrong or missing API parameters
class APIWrongCallException extends Exception {
}
//Permission denied (user not subscribed to this feed id!)
class PermissionDeniedException extends Exception {
}
//File/URL loading failed
class FileLoadException extends Exception {
}
//Item already in DB
class AlreadyPresentException extends Exception {
}
//pseudo exception for login-exceptions like wrong username/password
class LoginException extends Exception {
}
//cURL exception
class CURLException extends Exception {
function __construct($msg,$c) {
$msg.=": ".curl_error($c);
parent::__construct($msg);
}
}
//cURL server exception
class CURLDownloadException extends Exception {
public $rc;
function __construct($rc) {
$this->rc=$rc;
parent::__construct("HTTP return code: $rc");
}
}