aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
diff options
context:
space:
mode:
authorMatt Windsor <mattwindsor@btinternet.com>2011-03-18 14:01:42 +0000
committerMatt Windsor <mattwindsor@btinternet.com>2011-03-18 14:01:42 +0000
commitdfde3f3d62ee5de17d09195513711fd006cbf270 (patch)
tree0fb70b0f75927a03daa8ad8ddc218f6e657e6d66 /src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
parentb6831f847f93622a64f1b776bc3cf62befddab98 (diff)
Remove duplicate files; begin rewriting server to use Apache HttpCore by using HttpCore Response resources; exception-based error handling introduced for get requests.
Diffstat (limited to 'src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java')
-rw-r--r--src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java b/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
new file mode 100644
index 0000000..d301eac
--- /dev/null
+++ b/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
@@ -0,0 +1,55 @@
+/**
+ *
+ */
+package uk.org.ury.server.exceptions;
+
+/**
+ * Exception thrown when the server request handler requested
+ * by the client cannot be set up to process the request.
+ *
+ * @author Matt Windsor
+ */
+
+public class HandlerSetupFailureException extends HandlingException
+{
+
+ /**
+ * TODO: Change this! ---v
+ */
+
+ private static final long serialVersionUID = -397479334359858162L;
+
+
+ /**
+ * Construct a new HandlerNotFoundException with a
+ * default reason.
+ */
+
+ public
+ HandlerSetupFailureException ()
+ {
+ super ("Handler setup failed.");
+ }
+
+
+ /**
+ * Construct a new HandlerSetupFailureException with a class name
+ * and chained exception.
+ *
+ * Use this to hide exception specifics from higher abstraction
+ * layers.
+ *
+ * @param className The name of the failed handler class.
+ *
+ * @param cause The exception that this new exception is to
+ * wrap.
+ */
+
+ public
+ HandlerSetupFailureException (String className,
+ Throwable cause)
+ {
+ super ("Setup for handler " + className + " failed (reason: "
+ + cause.getMessage () + ").", cause);
+ }
+}