Package 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>
A
SQLException that contains information about
the Statement SQL that caused the exception.- Author:
- Marc Prud'hommeaux
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReportingSQLException(SQLException sqle, Statement stmnt, String sql) Supply original exception and non-null Statement and/or SQL string. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the error code of the underlyingSQLException.intgetSQL()Gets the SQL string if available.Returns the SQL state of the underlyingSQLException.Returns theStatementthat caused the exception.voidsetIndexOfFirstFailedObject(int index) Methods inherited from class java.sql.SQLException
getNextException, iterator, setNextExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ReportingSQLException
Supply original exception and non-null Statement and/or SQL string.
-
-
Method Details
-
getSQL
Gets the SQL string if available. -
getSQLState
Returns the SQL state of the underlyingSQLException.- Overrides:
getSQLStatein classSQLException
-
getErrorCode
public int getErrorCode()Returns the error code of the underlyingSQLException.- Overrides:
getErrorCodein classSQLException
-
getStatement
Returns theStatementthat caused the exception. -
getIndexOfFirstFailedObject
public int getIndexOfFirstFailedObject() -
setIndexOfFirstFailedObject
public void setIndexOfFirstFailedObject(int index)
-