01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Library License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: OzoneInternalExc.java,v 1.2 2002/06/08 00:49:38 mediumnet Exp $
08:
09: package org.ozoneDB;
10:
11: import java.io.PrintStream;
12:
13: /**
14: * This exception signals an internal server exception.
15: *
16: *
17: * @author <a href="http://www.softwarebuero.de/">SMB</a>
18: * @author <a href="http://www.medium.net/">Medium.net</a>
19: * @version $Revision: 1.2 $Date: 2002/06/08 00:49:38 $
20: */
21: public class OzoneInternalExc extends OzoneRemoteExc {
22:
23: protected Throwable cause;
24:
25: public OzoneInternalExc() {
26: super ();
27: }
28:
29: public OzoneInternalExc(String s) {
30: super (s);
31: }
32:
33: public OzoneInternalExc(String s, Throwable cause) {
34: super (s);
35: this .cause = cause;
36: }
37:
38: public Throwable getCause() {
39: return cause;
40: }
41:
42: public void printStackTrace(PrintStream s) {
43: Throwable cause = getCause();
44:
45: if (cause != null) {
46: originalPrintStackTrace(s);
47: s.println("---");
48: cause.printStackTrace(s);
49: } else {
50: originalPrintStackTrace(s);
51: }
52: }
53:
54: public void originalPrintStackTrace(PrintStream s) {
55: super.printStackTrace(s);
56: }
57: }
|