-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLudoDBExceptions.php
More file actions
132 lines (118 loc) · 2.84 KB
/
LudoDBExceptions.php
File metadata and controls
132 lines (118 loc) · 2.84 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/**
* Created by JetBrains PhpStorm.
* User: Alf Magne
* Date: 30.01.13
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
/**
* LudoDBException base class
* @package LudoDB
*/
class LudoDBException extends Exception{
/**
* Exception code
* @var int
*/
protected $code = 400;
}
/**
* Class not found exception.
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBClassNotFoundException extends LudoDBException
{
/**
* Exception code
* @var int
*/
protected $code = 404;
}
/**
* Object not found exception.
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBObjectNotFoundException extends LudoDBException{
/**
* Exception code
* @var int
*/
protected $code = 404;
}
/**
* DB Connection error exception.
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBConnectionException extends LudoDBException{
}
/**
* Invalid constructor arguments exception.
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBInvalidArgumentsException extends LudoDBException{
}
/**
* Unauthorized exception
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBUnauthorizedException extends LudoDBException{
/**
* Exception code
* @var int
*/
protected $code = 401;
}
/**
* Service not implemented exception. Executed when a service is returned from getValidServices, but
* the service method is not implemented.
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBServiceNotImplementedException extends LudoDBException{
/**
* Exception code
* @var int
*/
protected $code = 404;
}
/**
* Invalid service exception. Executed on call for service name not returned by getValidServices.
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBInvalidServiceException extends Exception{
/**
* Exception code
* @var int
*/
protected $code = 405;
}
/**
* Invalid Config Exception. Executed on invalid configuration of LudoDB classes
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBInvalidConfigException extends LudoDBException{
}
/**
* Exception thrown when trying to save invalid model data
* Thrown by LudoDBRequestHandler
* @package LudoDB
* @author Alf Magne Kalleland <post@dhtmlgoodies.com>
*/
class LudoDBInvalidModelDataException extends LudoDBException{
}