/*
 * Jakelib2 - General purpose C++ library
 * Copyright (C) 2001 Florian Wolff  (florian@donuz.de)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * $Id: RuntimeException.h,v 1.2 2003/01/25 15:56:00 florian Exp $
 */

#ifndef INCLUDE_JAKELIB2_LANG_RUNTIMEEXCEPTION_H
# define INCLUDE_JAKELIB2_LANG_RUNTIMEEXCEPTION_H

#include "Exception.h"

namespace jakelib {
  namespace lang {
    /**
     * All exceptions which are subclasses of <code>RuntimeException</code>
     * can be thrown at any time during the execution of a Java virtual machine.
     * Methods which throw these exceptions are not required to declare them
     * in their throws clause.
     *
     * @author Brian Jones
     * @author Warren Levy <warrenl@cygnus.com>
     * @author Eric Blake <ebb9@email.byu.edu>
     * @status updated to 1.4
     */
    class RuntimeException : public Exception
      {
        /**
         * Compatible with JDK 1.0+.
         */
      private: static jlong serialVersionUID;// = -7034897190745766939L;

      /**
       * Create an exception without a message. The cause remains uninitialized.
       *
       * @see #initCause(Throwable)
       */
      public: RuntimeException();

      /**
       * Create an exception with a message. The cause remains uninitialized.
       *
       * @param s the message string
       * @see #initCause(Throwable)
       */
      public: RuntimeException(jakelib::lang::String* s);

      JAKELIB_DECLARE_CLASS(RuntimeException);

      /**
       * Create an exception with a message and a cause.
       *
       * @param s the message string
       * @param cause the cause of this exception
       * @since 1.4
       */
      /*T.B.D.
        public: RuntimeException(jakelib::lang::String* s, jakelib::lang::Throwable* cause);
      */
      /**
       * Create an exception with the given cause, and a message of
       * <code>cause == null ? null : cause.toString()</code>.
       *
       * @param cause the cause of this exception
       * @since 1.4
       */
      /*T.B.D.
        public: RuntimeException(jakelib::lang::Throwable* cause);
      */
      };

  }
}

#endif
