KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > util > ExceptionWrapper


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2000,2006 Oracle. All rights reserved.
5  *
6  * $Id: ExceptionWrapper.java,v 1.16 2006/10/30 21:14:34 bostic Exp $
7  */

8
9 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 JavaDoc 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 JavaDoc getCause();
38 }
39
Popular Tags