aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 13:01:34 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 13:01:34 +0000
commit06c9b2931ba80b9023301cd20ce541fdf577814b (patch)
tree6a8363c8c190330ce987ccb8c663b776dab42be5
parent0e3ba84313053497560808c3aa6ff910862ae549 (diff)
downloadelgg-06c9b2931ba80b9023301cd20ce541fdf577814b.tar.gz
elgg-06c9b2931ba80b9023301cd20ce541fdf577814b.tar.bz2
Added exceptions
git-svn-id: https://code.elgg.org/elgg/trunk@15 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/exceptions.php73
1 files changed, 73 insertions, 0 deletions
diff --git a/engine/lib/exceptions.php b/engine/lib/exceptions.php
new file mode 100644
index 000000000..d90513cfc
--- /dev/null
+++ b/engine/lib/exceptions.php
@@ -0,0 +1,73 @@
+<?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 //////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @class IOException
+ * An IO Exception, throw when an IO Exception occurs. Subclass for specific IO Exceptions.
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class IOException extends Exception {}
+
+ /**
+ * @class ClassException
+ * A class Exception, throw when there is a class error.
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class ClassException extends Exception {}
+
+ /**
+ * @class ConfigurationException
+ * There is a configuration error
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class ConfigurationException extends Exception {}
+
+ /**
+ * @class 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>
+ */
+ class SecurityException extends Exception {}
+
+ /**
+ * @class ClassNotFoundException
+ * An database exception, throw when a database exception happens, subclass if more detail is needed.
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class DatabaseException extends Exception {}
+
+ /**
+ * @class APIException
+ * The API Exception class, thrown by the API layer when an API call has an issue.
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class APIException extends Exception {}
+
+ // Class exceptions ///////////////////////////////////////////////////////////////////////
+
+ /**
+ * @class InvalidClassException
+ * An invalid class Exception, throw when a class is invalid.
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class InvalidClassException extends ClassException {}
+
+ /**
+ * @class ClassNotFoundException
+ * An Class not found Exception, throw when an class can not be found occurs.
+ * @author Marcus Povey <marcus@dushka.co.uk>
+ */
+ class ClassNotFoundException extends ClassException {}
+?> \ No newline at end of file