1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2000,2008 Oracle. All rights reserved. 5 * 6 * $Id: ExceptionWrapper.java,v 12.8 2008/01/08 20:58:39 bostic Exp $ 7 */ 8 9package com.sleepycat.util; 10 11/** 12 * Interface implemented by exceptions that can contain nested exceptions. 13 * 14 * @author Mark Hayes 15 */ 16public 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} 39