01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2000,2008 Oracle. All rights reserved.
05: *
06: * $Id: RuntimeExceptionWrapper.java,v 1.14.2.2 2008/01/07 15:14:21 cwl Exp $
07: */
08:
09: package com.sleepycat.util;
10:
11: /**
12: * A RuntimeException that can contain nested exceptions.
13: *
14: * @author Mark Hayes
15: */
16: public class RuntimeExceptionWrapper extends RuntimeException implements
17: ExceptionWrapper {
18:
19: private Throwable e;
20:
21: public RuntimeExceptionWrapper(Throwable e) {
22:
23: super (e.getMessage());
24: this .e = e;
25: }
26:
27: /**
28: * @deprecated replaced by {@link #getCause}.
29: */
30: public Throwable getDetail() {
31:
32: return e;
33: }
34:
35: public Throwable getCause() {
36:
37: return e;
38: }
39: }
|