01: /**
02: * $RCSfile$
03: * $Revision: 128 $
04: * $Date: 2004-10-25 20:42:00 -0300 (Mon, 25 Oct 2004) $
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 requested operation is forbidden for the user in
17: * the MUCRoom. There are many reasons why a forbidden error could occur such as: a banned user
18: * tries to join a room where he/she is an outcast. A 403 error code is returned to the user that
19: * requested the invalid operation.
20: *
21: * @author Gaston Dombiak
22: */
23: public class ForbiddenException extends Exception {
24:
25: private static final long serialVersionUID = 1L;
26:
27: private Throwable nestedThrowable = null;
28:
29: public ForbiddenException() {
30: super ();
31: }
32:
33: public ForbiddenException(String msg) {
34: super (msg);
35: }
36:
37: public ForbiddenException(Throwable nestedThrowable) {
38: this .nestedThrowable = nestedThrowable;
39: }
40:
41: public ForbiddenException(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: }
|