01: /**
02: * $Revision$
03: * $Date$
04: *
05: * Copyright (C) 1999-2005 Jive Software. All rights reserved.
06: * This software is the proprietary information of Jive Software. Use is subject to license terms.
07: */package org.jivesoftware.util;
08:
09: import java.io.PrintStream;
10: import java.io.PrintWriter;
11:
12: /**
13: * Exception thrown during application or component initialization failure.
14: */
15: public class InitializationException extends Exception {
16: private Throwable nestedThrowable = null;
17:
18: public InitializationException() {
19: super ();
20: }
21:
22: public InitializationException(String msg) {
23: super (msg);
24: }
25:
26: public InitializationException(Throwable nestedThrowable) {
27: this .nestedThrowable = nestedThrowable;
28: }
29:
30: public InitializationException(String msg, Throwable nestedThrowable) {
31: super (msg);
32: this .nestedThrowable = nestedThrowable;
33: }
34:
35: public void printStackTrace() {
36: super .printStackTrace();
37: if (nestedThrowable != null) {
38: nestedThrowable.printStackTrace();
39: }
40: }
41:
42: public void printStackTrace(PrintStream ps) {
43: super .printStackTrace(ps);
44: if (nestedThrowable != null) {
45: nestedThrowable.printStackTrace(ps);
46: }
47: }
48:
49: public void printStackTrace(PrintWriter pw) {
50: super.printStackTrace(pw);
51: if (nestedThrowable != null) {
52: nestedThrowable.printStackTrace(pw);
53: }
54: }
55: }
|