From dfde3f3d62ee5de17d09195513711fd006cbf270 Mon Sep 17 00:00:00 2001 From: Matt Windsor Date: Fri, 18 Mar 2011 14:01:42 +0000 Subject: Remove duplicate files; begin rewriting server to use Apache HttpCore by using HttpCore Response resources; exception-based error handling introduced for get requests. --- .../ury/server/exceptions/HandlingException.java | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/uk/org/ury/server/exceptions/HandlingException.java (limited to 'src/uk/org/ury/server/exceptions/HandlingException.java') diff --git a/src/uk/org/ury/server/exceptions/HandlingException.java b/src/uk/org/ury/server/exceptions/HandlingException.java new file mode 100644 index 0000000..2ce681b --- /dev/null +++ b/src/uk/org/ury/server/exceptions/HandlingException.java @@ -0,0 +1,48 @@ +/** + * + */ +package uk.org.ury.server.exceptions; + +/** + * Generic exception thrown when the server cannot handle a request. + * + * @author Matt Windsor + */ + +public class HandlingException extends Exception +{ + /** + * TODO: Change this! ---v + */ + + private static final long serialVersionUID = -397479334359858162L; + + + /** + * Construct a HandlingException with a reason. + * + * @param string The reason to present. + */ + + public + HandlingException (String string) + { + super (string); + } + + + /** + * Construct a HandlingException with a reason and a cause to + * chain. + * + * @param string The reason to present. + * + * @param cause The thrown cause that this exception should wrap. + */ + + public + HandlingException (String string, Throwable cause) + { + super (string, cause); + } +} -- cgit v1.2.3