aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2015-05-03 22:25:46 +0200
committerlookshe <github@lookshe.org>2015-06-19 09:46:40 +0200
commit7382e3af9769f76fe4e19934a59e45a3f9858332 (patch)
treec37cdb03dfaeaccde7c8dd7c79887bf0de278f83 /src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java
parentb3b4a2902e37fb072e800f5dff0392755f5d4501 (diff)
renaming eu.siacs.conversations to de.thedevstack.conversationsplus
"renaming eu.siacs.conversations to de.thedevstack.conversationsplus" package renaming completed
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java
new file mode 100644
index 00000000..3c8dd717
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java
@@ -0,0 +1,49 @@
+package de.thedevstack.conversationsplus.xmpp.jid;
+
+public class InvalidJidException extends Exception {
+
+ // This is probably not the "Java way", but the "Java way" means we'd have a ton of extra tiny,
+ // annoying classes floating around. I like this.
+ public final static String INVALID_LENGTH = "JID must be between 0 and 3071 characters";
+ public final static String INVALID_PART_LENGTH = "JID part must be between 0 and 1023 characters";
+ public final static String INVALID_CHARACTER = "JID contains an invalid character";
+ public final static String STRINGPREP_FAIL = "The STRINGPREP operation has failed for the given JID";
+ public final static String IS_NULL = "JID can not be NULL";
+
+ /**
+ * Constructs a new {@code Exception} that includes the current stack trace.
+ */
+ public InvalidJidException() {
+ }
+
+ /**
+ * Constructs a new {@code Exception} with the current stack trace and the
+ * specified detail message.
+ *
+ * @param detailMessage the detail message for this exception.
+ */
+ public InvalidJidException(final String detailMessage) {
+ super(detailMessage);
+ }
+
+ /**
+ * Constructs a new {@code Exception} with the current stack trace, the
+ * specified detail message and the specified cause.
+ *
+ * @param detailMessage the detail message for this exception.
+ * @param throwable the cause of this exception.
+ */
+ public InvalidJidException(final String detailMessage, final Throwable throwable) {
+ super(detailMessage, throwable);
+ }
+
+ /**
+ * Constructs a new {@code Exception} with the current stack trace and the
+ * specified cause.
+ *
+ * @param throwable the cause of this exception.
+ */
+ public InvalidJidException(final Throwable throwable) {
+ super(throwable);
+ }
+}