aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/exceptions.php
blob: e797f85bc4a0c993749baec4e88b14c408eb74c7 (plain)
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
133
134
135
136
137
138
139
140
141
142
<?php
	/**
	 * Exceptions.
	 * Define some globally useful exception classes.
	 * 
	 * @package Elgg
	 * @subpackage Exceptions
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.org/
	 */

	// Top level //////////////////////////////////////////////////////////////////////////////

	/**
	 * IOException 
	 * An IO Exception, throw when an IO Exception occurs. Subclass for specific IO Exceptions.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class IOException extends Exception {}

	/**
	 * ClassException 
	 * A class Exception, throw when there is a class error.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class ClassException extends Exception {}

	/**
	 * ConfigurationException 
	 * There is a configuration error
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class ConfigurationException extends Exception {}

	/**
	 * SecurityException 
	 * An Security Exception, throw when a Security Exception occurs. Subclass for specific Security Execeptions (access problems etc)
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class SecurityException extends Exception {}

	/**
	 * ClassNotFoundException 
	 * An database exception, throw when a database exception happens, subclass if more detail is needed.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class DatabaseException extends Exception {}

	/**
	 * APIException
	 * The API Exception class, thrown by the API layer when an API call has an issue.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class APIException extends Exception {}
	
	/**
	 * CallException
	 * An exception thrown when there is a problem calling something.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class CallException extends Exception {}
	
	// Class exceptions ///////////////////////////////////////////////////////////////////////

	/**
	 * InvalidClassException 
	 * An invalid class Exception, throw when a class is invalid.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class InvalidClassException extends ClassException {}

	/**
	 * ClassNotFoundException 
	 * An Class not found Exception, throw when an class can not be found occurs.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class ClassNotFoundException extends ClassException {}
	
	// Configuration exceptions ///////////////////////////////////////////////////////////////

	/**
	 * InstallationException
	 * Thrown when there is a major problem with the installation.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class InstallationException extends ConfigurationException {}
	
	// Call exceptions ////////////////////////////////////////////////////////////////////////

	/**
	 * NotImplementedException
	 * Thrown when a method or function has not been implemented, primarily used in development... you should
	 * not see these!
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class NotImplementedException extends CallException {}
	
	/**
	 * InvalidParameterException
	 * A parameter is invalid.
	 * 
	 * @author Marcus Povey <marcus@dushka.co.uk>
	 * @package Elgg
	 * @subpackage Exceptions
	 */
	class InvalidParameterException extends CallException {}
?>