KickJava   Java API By Example, From Geeks To Geeks.

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


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

8
9 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 JavaDoc
17     implements ExceptionWrapper {
18
19     private Throwable JavaDoc e;
20
21     public RuntimeExceptionWrapper(Throwable JavaDoc e) {
22
23         super(e.getMessage());
24         this.e = e;
25     }
26
27     /**
28      * @deprecated replaced by {@link #getCause}.
29      */

30     public Throwable JavaDoc getDetail() {
31
32         return e;
33     }
34
35     public Throwable JavaDoc getCause() {
36
37         return e;
38     }
39 }
40
Popular Tags