diff options
Diffstat (limited to 'src/uk/org/ury/protocol/exceptions')
-rw-r--r-- | src/uk/org/ury/protocol/exceptions/DecodeFailureException.java | 32 | ||||
-rw-r--r-- | src/uk/org/ury/protocol/exceptions/InvalidMessageException.java | 33 |
2 files changed, 65 insertions, 0 deletions
diff --git a/src/uk/org/ury/protocol/exceptions/DecodeFailureException.java b/src/uk/org/ury/protocol/exceptions/DecodeFailureException.java new file mode 100644 index 0000000..708732b --- /dev/null +++ b/src/uk/org/ury/protocol/exceptions/DecodeFailureException.java @@ -0,0 +1,32 @@ +/** + * + */ +package uk.org.ury.protocol.exceptions; + + +/** + * Exception thrown when the protocol decoder fails. + * + * @author Matt Windsor + */ + +public class DecodeFailureException extends Exception +{ + /** + * + */ + private static final long serialVersionUID = -3972492943653273528L; + + + /** + * Construct a new DecodeFailureException with a reason. + * + * @param reason The reason for throwing the exception. + */ + + public + DecodeFailureException (String reason) + { + super (reason); + } +} diff --git a/src/uk/org/ury/protocol/exceptions/InvalidMessageException.java b/src/uk/org/ury/protocol/exceptions/InvalidMessageException.java new file mode 100644 index 0000000..3cf1105 --- /dev/null +++ b/src/uk/org/ury/protocol/exceptions/InvalidMessageException.java @@ -0,0 +1,33 @@ +/** + * + */ +package uk.org.ury.protocol.exceptions; + + +/** + * Generic exception thrown when a protocol function cannot process a + * message due to an issue with the message. + * + * @author Matt Windsor + */ + +public class InvalidMessageException extends Exception +{ + /** + * + */ + private static final long serialVersionUID = -3972492943653273528L; + + + /** + * Construct a new InvalidMessageException with a reason. + * + * @param reason The reason for throwing the exception. + */ + + public + InvalidMessageException (String reason) + { + super (reason); + } +} |