aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/server/exceptions/BadRequestException.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/uk/org/ury/server/exceptions/BadRequestException.java')
-rw-r--r--src/uk/org/ury/server/exceptions/BadRequestException.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/uk/org/ury/server/exceptions/BadRequestException.java b/src/uk/org/ury/server/exceptions/BadRequestException.java
new file mode 100644
index 0000000..61aa951
--- /dev/null
+++ b/src/uk/org/ury/server/exceptions/BadRequestException.java
@@ -0,0 +1,48 @@
+/**
+ *
+ */
+package uk.org.ury.server.exceptions;
+
+/**
+ * Exception thrown when the server meets a malformed request, or
+ * part of one.
+ *
+ * @author Matt Windsor
+ */
+
+public class BadRequestException extends HandlingException
+{
+
+ /**
+ * TODO: Change this! ---v
+ */
+
+ private static final long serialVersionUID = -397479334359858162L;
+
+
+ /**
+ * Construct a new BadRequestException with a default reason.
+ */
+
+ public
+ BadRequestException ()
+ {
+ super ("Bad request.");
+ }
+
+
+ /**
+ * Construct a new HandlerNotFoundException with a chained
+ * exception.
+ *
+ * @param cause The exception that this new exception is to
+ * wrap.
+ */
+
+ public
+ BadRequestException (Throwable cause)
+ {
+ super ("Bad request. ("
+ + cause.getMessage () + ")", cause);
+ }
+}