01: /*
02: * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.harness;
07:
08: import java.io.PrintWriter;
09: import java.io.IOException;
10: import java.io.BufferedReader;
11: import java.io.FileInputStream;
12: import java.io.PrintStream;
13: import java.io.PrintWriter;
14:
15: import javax.servlet.http.HttpServletResponse;
16:
17: import com.sun.portal.util.UnicodeInputStreamReader;
18:
19: public class ProviderHarnessException extends Exception {
20: private ProviderHarnessException() {
21: // nothing
22: }
23:
24: public ProviderHarnessException(String msg) {
25: super (msg);
26: }
27:
28: public ProviderHarnessException(String msg, Throwable e) {
29: super (msg);
30: m_Wrapped = e;
31: }
32:
33: public Throwable getWrapped() {
34: return m_Wrapped;
35: }
36:
37: public String getMessage() {
38: StringBuffer b = new StringBuffer();
39: Throwable e = getWrapped();
40:
41: b.append(super .getMessage());
42: if (e != null) {
43: b.append(" (");
44: b.append(e.toString());
45: b.append(")");
46: }
47:
48: return b.toString();
49: }
50:
51: public void printStackTrace() {
52: super .printStackTrace();
53: Throwable e = getWrapped();
54: if (e != null) {
55: e.printStackTrace();
56: }
57: }
58:
59: public void printStackTrace(PrintStream s) {
60: super .printStackTrace(s);
61: Throwable e = getWrapped();
62: if (e != null) {
63: e.printStackTrace(s);
64: }
65: }
66:
67: public void printStackTrace(PrintWriter s) {
68: super .printStackTrace(s);
69: Throwable e = getWrapped();
70: if (e != null) {
71: e.printStackTrace(s);
72: }
73: }
74:
75: protected Throwable m_Wrapped = null;
76: }
|