DbcpException (Apache Tomcat 7.0.104 API Documentation)

org.apache.tomcat.dbcp.dbcp

## Class DbcpException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.tomcat.dbcp.dbcp.DbcpException

- All Implemented Interfaces:
    Serializable

  Deprecated.
  This will be removed in a future version of DBCP.

      @Deprecated
      public class DbcpException
      extends RuntimeException

  Subclass of `RuntimeException` that can be used to wrap a `SQLException` using the "root cause" pattern of JDK 1.4 exceptions, but without requiring a 1.4 runtime environment.

  Author:
    Jonathan Fuerth, Dan Fraser
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Throwable` | `cause` Deprecated. The root cause of this exception (typically an `SQLException` but this is not required).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DbcpException()` Deprecated. Construct a new runtime exception with `null` as its detail message.
    `DbcpException(String message)` Deprecated. Construct a new runtime exception with the specified detail message.
    `DbcpException(String message, Throwable cause)` Deprecated. Construct a new runtime exception with the specified detail message and cause.
    `DbcpException(Throwable cause)` Deprecated. Construct a new runtime exception with the specified cause and a detail message of `(cause == null ? null : cause.toString())`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Throwable` | `getCause()` Deprecated. Return the root cause of this exception (if any).

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### cause

          protected Throwable cause

      Deprecated.
      The root cause of this exception (typically an `SQLException` but this is not required).

  - ### Constructor Detail

    - #### DbcpException

          public DbcpException()

      Deprecated.
      Construct a new runtime exception with `null` as its detail message.

    - #### DbcpException

          public DbcpException(String message)

      Deprecated.
      Construct a new runtime exception with the specified detail message.
      Parameters:
        `message` - The detail message for this exception

    - #### DbcpException

          public DbcpException(String message,
                       Throwable cause)

      Deprecated.
      Construct a new runtime exception with the specified detail message and cause.
      Parameters:
        `message` - The detail message for this exception
        `cause` - The root cause for this exception

    - #### DbcpException

          public DbcpException(Throwable cause)

      Deprecated.
      Construct a new runtime exception with the specified cause and a detail message of `(cause == null ? null : cause.toString())`.
      Parameters:
        `cause` - The root cause for this exception

  - ### Method Detail

    - #### getCause

          public Throwable getCause()

      Deprecated.
      Return the root cause of this exception (if any).
      Overrides:
        `getCause` in class `Throwable`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.