aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/database/exceptions
diff options
context:
space:
mode:
Diffstat (limited to 'src/uk/org/ury/database/exceptions')
-rw-r--r--src/uk/org/ury/database/exceptions/MissingPropertyException.java47
-rw-r--r--src/uk/org/ury/database/exceptions/QueryFailureException.java1
2 files changed, 48 insertions, 0 deletions
diff --git a/src/uk/org/ury/database/exceptions/MissingPropertyException.java b/src/uk/org/ury/database/exceptions/MissingPropertyException.java
new file mode 100644
index 0000000..3766fcf
--- /dev/null
+++ b/src/uk/org/ury/database/exceptions/MissingPropertyException.java
@@ -0,0 +1,47 @@
+/**
+ *
+ */
+package uk.org.ury.database.exceptions;
+
+
+/**
+ * Exception thrown when a DatabaseItem is queried for a property
+ * that does not exist.
+ *
+ * This is (usually) not a fatal error.
+ *
+ * @author Matt Windsor
+ */
+
+public class MissingPropertyException extends Exception
+{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7353531873142099828L;
+
+
+/**
+ * Construct a new MissingPropertyException with a
+ * default reason.
+ */
+
+ public
+ MissingPropertyException ()
+ {
+ super ("Query failure.");
+ }
+
+
+ /**
+ * Construct a new MissingPropertyException.
+ *
+ * @param reason The explanation for the exception.
+ */
+
+ public
+ MissingPropertyException (String reason)
+ {
+ super (reason);
+ }
+}
diff --git a/src/uk/org/ury/database/exceptions/QueryFailureException.java b/src/uk/org/ury/database/exceptions/QueryFailureException.java
index d7b3e5b..5293a7c 100644
--- a/src/uk/org/ury/database/exceptions/QueryFailureException.java
+++ b/src/uk/org/ury/database/exceptions/QueryFailureException.java
@@ -3,6 +3,7 @@
*/
package uk.org.ury.database.exceptions;
+
/**
* Exception thrown when the database backend fails to execute
* a query.