Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.lib.jdbc
Class ReportingSQLException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.sql.SQLException
                  org.apache.openjpa.lib.jdbc.ReportingSQLException

All Implemented Interfaces:
  Serializable, Iterable<Throwable>

    public class ReportingSQLException

extends SQLException

A `SQLException` that contains information about the `Statement` SQL that caused the exception.

Author:
  Marc Prud'hommeaux
See Also:
  Serialized Form

Constructor Summary
`ReportingSQLException(SQLException sqle, Statement stmnt, String sql)` Supply original exception and non-null Statement and/or SQL string.

Method Summary
`int` | `getErrorCode()` Returns the error code of the underlying `SQLException`.
`int` | `getIndexOfFirstFailedObject()`
`String` | `getSQL()` Gets the SQL string if available.
`String` | `getSQLState()` Returns the SQL state of the underlying `SQLException`.
`Statement` | `getStatement()` Returns the `Statement` that caused the exception.
`void` | `setIndexOfFirstFailedObject(int index)`

Methods inherited from class java.sql.SQLException
`getNextException, iterator, setNextException`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ReportingSQLException

    public ReportingSQLException(SQLException sqle,
                                 Statement stmnt,
                                 String sql)

  Supply original exception and non-null Statement and/or SQL string.

Method Detail

### getSQL

    public String getSQL()

  Gets the SQL string if available.

### getSQLState

    public String getSQLState()

  Returns the SQL state of the underlying `SQLException`.

  Overrides:
    `getSQLState` in class `SQLException`

### getErrorCode

    public int getErrorCode()

  Returns the error code of the underlying `SQLException`.

  Overrides:
    `getErrorCode` in class `SQLException`

### getStatement

    public Statement getStatement()

  Returns the `Statement` that caused the exception.

### getIndexOfFirstFailedObject

    public int getIndexOfFirstFailedObject()

### setIndexOfFirstFailedObject

    public void setIndexOfFirstFailedObject(int index)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.