Home | History | Annotate | Download | only in domts
      1 /*
      2  * Copyright (c) 2001-2004 World Wide Web Consortium,
      3  * (Massachusetts Institute of Technology, Institut National de
      4  * Recherche en Informatique et en Automatique, Keio University). All
      5  * Rights Reserved. This program is distributed under the W3C's Software
      6  * Intellectual Property License. This program is distributed in the
      7  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
      8  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
      9  * PURPOSE.
     10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
     11  */
     12 
     13 package org.w3c.domts;
     14 
     15 
     16 /**
     17  * Encapsulates a concrete load exception such as
     18  * a SAX exception
     19  * @author Curt Arnold
     20  * @date 2 Feb 2002
     21  */
     22 public class DOMTestLoadException
     23     extends Exception {
     24   private final Throwable innerException;
     25 
     26   /**
     27    * Constructor
     28    * @param innerException should not be null
     29    */
     30   public DOMTestLoadException(Throwable innerException) {
     31     this.innerException = innerException;
     32   }
     33 
     34   public String toString() {
     35     if (innerException != null) {
     36       return innerException.toString();
     37     }
     38     return super.toString();
     39   }
     40 }
     41