01: /**
02: * $RCSfile$
03: * $Revision: 1276 $
04: * $Date: 2005-04-21 12:41:22 -0300 (Thu, 21 Apr 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 MultiUserChat service is not available at the moment.
17: * There are many reasons why a ServiceUnavailableException could occur such as: a user is trying
18: * to join a room that has reached the max number of occupants.
19: *
20: * @author Gaston Dombiak
21: */
22: public class ServiceUnavailableException extends Exception {
23:
24: private static final long serialVersionUID = 1L;
25:
26: private Throwable nestedThrowable = null;
27:
28: public ServiceUnavailableException() {
29: super ();
30: }
31:
32: public ServiceUnavailableException(String msg) {
33: super (msg);
34: }
35:
36: public ServiceUnavailableException(Throwable nestedThrowable) {
37: this .nestedThrowable = nestedThrowable;
38: }
39:
40: public ServiceUnavailableException(String msg,
41: 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: }
|