KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > reasoner > dig > DIGWrappedException


1 /*****************************************************************************
2  * Source code information
3  * -----------------------
4  * Original author Ian Dickinson, HP Labs Bristol
5  * Author email ian.dickinson@hp.com
6  * Package Jena 2
7  * Web http://sourceforge.net/projects/jena/
8  * Created 11-Sep-2003
9  * Filename $RCSfile: DIGWrappedException.java,v $
10  * Revision $Revision: 1.5 $
11  * Release status $State: Exp $
12  *
13  * Last modified on $Date: 2005/02/21 12:16:24 $
14  * by $Author: andy_seaborne $
15  *
16  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
17  * [See end of file]
18  *****************************************************************************/

19
20 // Package
21
///////////////
22
package com.hp.hpl.jena.reasoner.dig;
23
24
25 // Imports
26
///////////////
27

28 /**
29  * <p>
30  * An exception type that wraps a checked exception from the DIG interface as a Jena (runtime)
31  * exception.
32  * </p>
33  *
34  * @author Ian Dickinson, HP Labs (<a HREF="mailto:Ian.Dickinson@hp.com">email</a>)
35  * @version Release @release@ ($Id: DIGWrappedException.java,v 1.5 2005/02/21 12:16:24 andy_seaborne Exp $)
36  */

37 public class DIGWrappedException
38     extends DIGReasonerException
39 {
40     // Constants
41
//////////////////////////////////
42

43     // Static variables
44
//////////////////////////////////
45

46     // Instance variables
47
//////////////////////////////////
48

49     private Throwable JavaDoc m_ex;
50     
51     // Constructors
52
//////////////////////////////////
53

54     /**
55      * <p>Construct a DIG exception that wraps a deeper exception from the DIG interface.</p>
56      * @param ex An exception or other error to be wrapped
57      */

58     public DIGWrappedException( Throwable JavaDoc ex ) {
59         super( "DIG wrapped exception: " + ex.getMessage() );
60         m_ex = ex;
61     }
62     
63     
64     // External signature methods
65
//////////////////////////////////
66

67     /**
68      * <p>Answer the exception that this exception is wrapping.</p>
69      * @return The underlying, or wrapped, exception
70      */

71     public Throwable JavaDoc getWrappedException() {
72         return m_ex;
73     }
74     
75     
76     // Internal implementation methods
77
//////////////////////////////////
78

79     //==============================================================================
80
// Inner class definitions
81
//==============================================================================
82

83 }
84
85
86 /*
87  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
88  * All rights reserved.
89  *
90  * Redistribution and use in source and binary forms, with or without
91  * modification, are permitted provided that the following conditions
92  * are met:
93  * 1. Redistributions of source code must retain the above copyright
94  * notice, this list of conditions and the following disclaimer.
95  * 2. Redistributions in binary form must reproduce the above copyright
96  * notice, this list of conditions and the following disclaimer in the
97  * documentation and/or other materials provided with the distribution.
98  * 3. The name of the author may not be used to endorse or promote products
99  * derived from this software without specific prior written permission.
100  *
101  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
102  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
103  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
104  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
105  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
106  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
107  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
108  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
109  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
110  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
111  */

112
Popular Tags