aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/server/exceptions
diff options
context:
space:
mode:
authorMatt Windsor <mattwindsor@btinternet.com>2011-03-21 21:54:31 +0000
committerMatt Windsor <mattwindsor@btinternet.com>2011-03-21 21:54:31 +0000
commitdf7d7981b56a4560c95ea7e9b194080e93398ecf (patch)
treeb3ae4f02d23ae1f7f4951c776ee8d91b0047dd6f /src/uk/org/ury/server/exceptions
parent2d073129857a42ab4195cd433c8be152e357033f (diff)
GREAT PACKAGE RESHUFFLE: Everything is now organised into frontend, backend and common (to frontend and backend) packages. Things may have been broken. Doc refresh.
Diffstat (limited to 'src/uk/org/ury/server/exceptions')
-rw-r--r--src/uk/org/ury/server/exceptions/BadRequestException.java47
-rw-r--r--src/uk/org/ury/server/exceptions/HandleFailureException.java46
-rw-r--r--src/uk/org/ury/server/exceptions/HandlerNotFoundException.java51
-rw-r--r--src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java55
-rw-r--r--src/uk/org/ury/server/exceptions/HandlingException.java48
-rw-r--r--src/uk/org/ury/server/exceptions/NotAHandlerException.java34
-rw-r--r--src/uk/org/ury/server/exceptions/UnknownFunctionException.java37
7 files changed, 0 insertions, 318 deletions
diff --git a/src/uk/org/ury/server/exceptions/BadRequestException.java b/src/uk/org/ury/server/exceptions/BadRequestException.java
deleted file mode 100644
index 189c7f5..0000000
--- a/src/uk/org/ury/server/exceptions/BadRequestException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- */
-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
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 1825771401085225357L;
-
-
- /**
- * 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);
- }
-}
diff --git a/src/uk/org/ury/server/exceptions/HandleFailureException.java b/src/uk/org/ury/server/exceptions/HandleFailureException.java
deleted file mode 100644
index ddcfdea..0000000
--- a/src/uk/org/ury/server/exceptions/HandleFailureException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- *
- */
-package uk.org.ury.server.exceptions;
-
-/**
- * Generic exception thrown when a server request handler fails to
- * handle a request.
- *
- * @author Matt Windsor
- */
-
-public class HandleFailureException extends HandlingException
-{
-
- /**
- * Change this! ---v
- */
-
- private static final long serialVersionUID = -397479334359858162L;
-
-
- /**
- * 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);
- }
-}
diff --git a/src/uk/org/ury/server/exceptions/HandlerNotFoundException.java b/src/uk/org/ury/server/exceptions/HandlerNotFoundException.java
deleted file mode 100644
index 7b614f6..0000000
--- a/src/uk/org/ury/server/exceptions/HandlerNotFoundException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- *
- */
-package uk.org.ury.server.exceptions;
-
-/**
- * Exception thrown when the server request handler requested
- * by the client is not * found in the class space.
- *
- * @author Matt Windsor
- */
-
-public class HandlerNotFoundException extends HandlingException
-{
-
- /**
- * TODO: Change this! ---v
- */
-
- private static final long serialVersionUID = -397479334359858162L;
-
-
- /**
- * Construct a new HandlerNotFoundException with a
- * default reason.
- */
-
- public
- HandlerNotFoundException ()
- {
- super ("Handler not found.");
- }
-
-
- /**
- * Construct a new HandlerNotFoundException with a class name and
- * chained exception.
- *
- * @param className The name of the missing handler class.
- *
- * @param cause The exception that this new exception is to
- * wrap.
- */
-
- public
- HandlerNotFoundException (String className, Throwable cause)
- {
- super ("Handler " + className + " not found. ("
- + cause.getMessage () + ")", cause);
- }
-}
diff --git a/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java b/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
deleted file mode 100644
index d301eac..0000000
--- a/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- */
-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);
- }
-}
diff --git a/src/uk/org/ury/server/exceptions/HandlingException.java b/src/uk/org/ury/server/exceptions/HandlingException.java
deleted file mode 100644
index 2ce681b..0000000
--- a/src/uk/org/ury/server/exceptions/HandlingException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- *
- */
-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);
- }
-}
diff --git a/src/uk/org/ury/server/exceptions/NotAHandlerException.java b/src/uk/org/ury/server/exceptions/NotAHandlerException.java
deleted file mode 100644
index 9a67d62..0000000
--- a/src/uk/org/ury/server/exceptions/NotAHandlerException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- *
- */
-package uk.org.ury.server.exceptions;
-
-/**
- * Exception thrown if the class requested as a handler by the client
- * is, in fact, not a handler (it does not implement RequestHandler).
- *
- * @author Matt Windsor
- */
-
-public class NotAHandlerException extends HandlingException
-{
- /**
- *
- */
- private static final long serialVersionUID = -7268289187311868036L;
-
- /**
- * Construct a NotAHandlerException with the name of the class that
- * is not a handler.
- *
- * @param className The name of the offending class.
- */
-
- public
- NotAHandlerException (String className)
- {
- super ("Class " + className + " is not a request handler.");
- // TODO Auto-generated constructor stub
- }
-
-}
diff --git a/src/uk/org/ury/server/exceptions/UnknownFunctionException.java b/src/uk/org/ury/server/exceptions/UnknownFunctionException.java
deleted file mode 100644
index 13c1386..0000000
--- a/src/uk/org/ury/server/exceptions/UnknownFunctionException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * UnknownFunctionException.java
- * -----------------------------
- *
- * Part of the URY Server Platform
- *
- * V0.00 2011/03/20
- *
- * (C) 2011 URY Computing
- */
-
-package uk.org.ury.server.exceptions;
-
-/**
- * Exception thrown when a handler receives a request for a path that does not
- * correspond to one of its functions.
- *
- * @author Matt Windsor
- *
- */
-public class UnknownFunctionException extends HandlingException {
- /**
- *
- */
- private static final long serialVersionUID = -7557785978712465975L;
-
- /**
- * Construct a new UnknownFunctionException.
- *
- * @param path
- * The path that was requested.
- */
- public UnknownFunctionException(String path) {
- super("Not found: " + path);
- }
-
-}