aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/backend/server/exceptions
diff options
context:
space:
mode:
authorMatt Windsor <mattwindsor@btinternet.com>2011-03-23 15:16:34 +0000
committerMatt Windsor <mattwindsor@btinternet.com>2011-03-23 15:16:34 +0000
commitcb0a78131286b1a312351308d2cb6e59ed122fef (patch)
tree280ff409c85cc4e80e43a3ed14f648d15d077397 /src/uk/org/ury/backend/server/exceptions
parent5e6649f0524a28e5d53aea174da5e512e614f377 (diff)
common: Moved from json-simple to jackson as JSON backend; changes include less confusing decoder code and the possibility to migrate to decoding/encoding directly to object representations. backend: Fixed JSON encoding code which was directly calling JSON backend instead of using ProtocolUtils.
Diffstat (limited to 'src/uk/org/ury/backend/server/exceptions')
-rw-r--r--src/uk/org/ury/backend/server/exceptions/HandleFailureException.java65
1 files changed, 32 insertions, 33 deletions
diff --git a/src/uk/org/ury/backend/server/exceptions/HandleFailureException.java b/src/uk/org/ury/backend/server/exceptions/HandleFailureException.java
index 0efb7a3..adff78c 100644
--- a/src/uk/org/ury/backend/server/exceptions/HandleFailureException.java
+++ b/src/uk/org/ury/backend/server/exceptions/HandleFailureException.java
@@ -4,43 +4,42 @@
package uk.org.ury.backend.server.exceptions;
/**
- * Generic exception thrown when a server request handler fails to
- * handle a request.
+ * Generic exception thrown when a server request handler fails to handle a
+ * request.
*
* @author Matt Windsor
*/
+public class HandleFailureException extends HandlingException {
-public class HandleFailureException extends HandlingException
-{
-
- /**
- * Change this! ---v
- */
-
- private static final long serialVersionUID = -397479334359858162L;
+ /**
+ * Change this! ---v
+ */
+ private static final long serialVersionUID = -397479334359858162L;
+ /**
+ * Constructs a new HandleFailureException with a default reason.
+ */
+ public HandleFailureException() {
+ super("Server request handler failed to handle the request.");
+ }
- /**
- * Construct a new HandleFailureException with a
- * default reason.
- */
-
- public
- HandleFailureException ()
- {
- super ("Server request handler failed to handle the request.");
- }
-
-
- /**
- * Construct a new HandleFailureException.
- *
- * @param reason The explanation for the exception.
- */
-
- public
- HandleFailureException (String reason)
- {
- super (reason);
- }
+ /**
+ * Constructs a new HandleFailureException.
+ *
+ * @param reason
+ * The explanation for the exception.
+ */
+ public HandleFailureException(String reason) {
+ super(reason);
+ }
+
+ /**
+ * Constructs a new HandleFailureException with a chained exception.
+ *
+ * @param cause
+ * The chained exception.
+ */
+ public HandleFailureException(Throwable cause) {
+ super("Request handler failed: " + cause.getMessage(), cause);
+ }
}