01: /**
02: * $RCSfile$
03: * $Revision: 1622 $
04: * $Date: 2005-07-12 18:36:20 -0300 (Tue, 12 Jul 2005) $
05: *
06: * Copyright (C) 2004 Jive Software. All rights reserved.
07: *
08: * This software is published under the terms of the GNU Public License (GPL),
09: * a copy of which is included in this distribution.
10: */package org.jivesoftware.openfire.muc;
11:
12: import java.io.PrintStream;
13: import java.io.PrintWriter;
14:
15: /**
16: * Exception used for representing that the nickname used by the user is not acceptable. The reason
17: * for this could be that the user has previously registered with the room and the room is
18: * configured so that registered users must join using the reserved nickname. A 406 error code is
19: * returned to the user that requested the invalid operation.
20: *
21: * @author Gaston Dombiak
22: */
23: public class NotAcceptableException extends Exception {
24:
25: private static final long serialVersionUID = 1L;
26:
27: private Throwable nestedThrowable = null;
28:
29: public NotAcceptableException() {
30: super ();
31: }
32:
33: public NotAcceptableException(String msg) {
34: super (msg);
35: }
36:
37: public NotAcceptableException(Throwable nestedThrowable) {
38: this .nestedThrowable = nestedThrowable;
39: }
40:
41: public NotAcceptableException(String msg, Throwable nestedThrowable) {
42: super (msg);
43: this .nestedThrowable = nestedThrowable;
44: }
45:
46: public void printStackTrace() {
47: super .printStackTrace();
48: if (nestedThrowable != null) {
49: nestedThrowable.printStackTrace();
50: }
51: }
52:
53: public void printStackTrace(PrintStream ps) {
54: super .printStackTrace(ps);
55: if (nestedThrowable != null) {
56: nestedThrowable.printStackTrace(ps);
57: }
58: }
59:
60: public void printStackTrace(PrintWriter pw) {
61: super.printStackTrace(pw);
62: if (nestedThrowable != null) {
63: nestedThrowable.printStackTrace(pw);
64: }
65: }
66: }
|