001: /*****************************************************************************
002: * Source code information
003: * -----------------------
004: * Original author Ian Dickinson, HP Labs Bristol
005: * Author email ian.dickinson@hp.com
006: * Package Jena 2
007: * Web http://sourceforge.net/projects/jena/
008: * Created 11-Sep-2003
009: * Filename $RCSfile: DIGWrappedException.java,v $
010: * Revision $Revision: 1.8 $
011: * Release status $State: Exp $
012: *
013: * Last modified on $Date: 2008/01/02 12:07:11 $
014: * by $Author: andy_seaborne $
015: *
016: * (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
017: * [See end of file]
018: *****************************************************************************/package com.hp.hpl.jena.reasoner.dig;
019:
020: // Imports
021: ///////////////
022:
023: /**
024: * <p>
025: * An exception type that wraps a checked exception from the DIG interface as a Jena (runtime)
026: * exception.
027: * </p>
028: *
029: * @author Ian Dickinson, HP Labs (<a href="mailto:Ian.Dickinson@hp.com">email</a>)
030: * @version Release @release@ ($Id: DIGWrappedException.java,v 1.8 2008/01/02 12:07:11 andy_seaborne Exp $)
031: */
032: public class DIGWrappedException extends DIGReasonerException {
033: // Constants
034: //////////////////////////////////
035:
036: // Static variables
037: //////////////////////////////////
038:
039: // Instance variables
040: //////////////////////////////////
041:
042: private Throwable m_ex;
043:
044: // Constructors
045: //////////////////////////////////
046:
047: /**
048: * <p>Construct a DIG exception that wraps a deeper exception from the DIG interface.</p>
049: * @param ex An exception or other error to be wrapped
050: */
051: public DIGWrappedException(Throwable ex) {
052: super ("DIG wrapped exception: " + ex.getMessage());
053: m_ex = ex;
054: }
055:
056: // External signature methods
057: //////////////////////////////////
058:
059: /**
060: * <p>Answer the exception that this exception is wrapping.</p>
061: * @return The underlying, or wrapped, exception
062: */
063: public Throwable getWrappedException() {
064: return m_ex;
065: }
066:
067: // Internal implementation methods
068: //////////////////////////////////
069:
070: //==============================================================================
071: // Inner class definitions
072: //==============================================================================
073:
074: }
075:
076: /*
077: * (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
078: * All rights reserved.
079: *
080: * Redistribution and use in source and binary forms, with or without
081: * modification, are permitted provided that the following conditions
082: * are met:
083: * 1. Redistributions of source code must retain the above copyright
084: * notice, this list of conditions and the following disclaimer.
085: * 2. Redistributions in binary form must reproduce the above copyright
086: * notice, this list of conditions and the following disclaimer in the
087: * documentation and/or other materials provided with the distribution.
088: * 3. The name of the author may not be used to endorse or promote products
089: * derived from this software without specific prior written permission.
090: *
091: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
092: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
093: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
094: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
095: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
096: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
097: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
098: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
099: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
100: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
101: */
|