01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2000,2008 Oracle. All rights reserved.
05: *
06: * $Id: ExceptionWrapper.java,v 1.16.2.2 2008/01/07 15:14:21 cwl Exp $
07: */
08:
09: package com.sleepycat.util;
10:
11: /**
12: * Interface implemented by exceptions that can contain nested exceptions.
13: *
14: * @author Mark Hayes
15: */
16: public interface ExceptionWrapper {
17:
18: /**
19: * Returns the nested exception or null if none is present.
20: *
21: * @return the nested exception or null if none is present.
22: *
23: * @deprecated replaced by {@link #getCause}.
24: */
25: Throwable getDetail();
26:
27: /**
28: * Returns the nested exception or null if none is present.
29: *
30: * <p>This method is intentionally defined to be the same signature as the
31: * <code>java.lang.Throwable.getCause</code> method in Java 1.4 and
32: * greater. By defining this method to return a nested exception, the Java
33: * 1.4 runtime will print the nested stack trace.</p>
34: *
35: * @return the nested exception or null if none is present.
36: */
37: Throwable getCause();
38: }
|