aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/jid/InvalidJidException.java
blob: 3c8dd7172cf1038b922d7b4b90dd184dff4bb33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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);
    }
}