DatabaseUnitRuntimeException.java

  1. /*
  2.  *
  3.  * The DbUnit Database Testing Framework
  4.  * Copyright (C)2002-2004, DbUnit.org
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2.1 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the Free Software
  18.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19.  *
  20.  */
  21. package org.dbunit;


  22. /**
  23.  * @author Manuel Laflamme
  24.  * @author Last changed by: $Author$
  25.  * @version $Revision$ $Date$
  26.  * @since 1.0
  27.  */
  28. public class DatabaseUnitRuntimeException extends RuntimeException
  29. {

  30.     /**
  31.      *
  32.      */
  33.     private static final long serialVersionUID = -3238403495229458202L;


  34.     /**
  35.      * Constructs an <code>DatabaseUnitRuntimeException</code> with no specified
  36.      * detail message and no encapsulated exception.
  37.      */
  38.     public DatabaseUnitRuntimeException()
  39.     {
  40.         super();
  41.     }

  42.     /**
  43.      * Constructs an <code>DatabaseUnitRuntimeException</code> with the specified
  44.      * detail message and no encapsulated exception.
  45.      * @param msg Exception message
  46.      */
  47.     public DatabaseUnitRuntimeException(String msg)
  48.     {
  49.         super(msg);
  50.     }

  51.     /**
  52.      * Constructs an <code>DatabaseUnitRuntimeException</code> with the specified
  53.      * detail message and encapsulated exception.
  54.      * @param msg
  55.      * @param cause The cause of this exception
  56.      */
  57.     public DatabaseUnitRuntimeException(String msg, Throwable cause)
  58.     {
  59.         super(msg, cause);
  60.     }

  61.     /**
  62.      * Constructs an <code>DatabaseUnitRuntimeException</code> with the encapsulated
  63.      * exception and use its message as detail message.
  64.      * @param cause The cause of this exception
  65.      */
  66.     public DatabaseUnitRuntimeException(Throwable cause)
  67.     {
  68.         super(cause.toString(), cause);
  69.     }

  70.     /**
  71.      * Returns the encapsulated exception or <code>null</code> if none.
  72.      * @deprecated Use {@link Exception#getCause()} instead
  73.      */
  74.     public Throwable getException()
  75.     {
  76.         return super.getCause();
  77.     }

  78. }