SQLExceptionList (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.tomcat.dbcp.dbcp2, class: SQLExceptionList

# Class SQLExceptionList

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.apache.tomcat.dbcp.dbcp2.SQLExceptionList

All Implemented Interfaces:
  `Serializable, Iterable<Throwable>`

public class SQLExceptionList extends SQLException
An SQLException based on a list of Throwable causes.

The first exception in the list is used as this exception's cause and is accessible with the usual `Throwable.getCause()` while the complete list is accessible with `getCauseList()`.

Since:
  2.7.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SQLExceptionList(List<? extends Throwable> causeList)`
  Creates a new exception caused by a list of exceptions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<? extends Throwable>`
  `getCauseList()`
  Gets the cause list.

  ### Methods inherited from class SQLException

  `getErrorCode, getNextException, getSQLState, iterator, setNextException`

  ### Methods inherited from class Throwable

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

  ### Methods inherited from class Object

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

  ### Methods inherited from interface Iterable

  `forEach, spliterator`

- ## Constructor Details

  - ### SQLExceptionList

    public SQLExceptionList(List<? extends Throwable> causeList)
    Creates a new exception caused by a list of exceptions.
    Parameters:
      `causeList` - a list of cause exceptions.

- ## Method Details

  - ### getCauseList

    public List<? extends Throwable> getCauseList()
    Gets the cause list.
    Returns:
      The list of causes.