Class ReportingSQLException

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Throwable>

    public class ReportingSQLException
    extends java.sql.SQLException
    A SQLException that contains information about the Statement SQL that caused the exception.
    Author:
    Marc Prud'hommeaux
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ReportingSQLException​(java.sql.SQLException sqle, java.sql.Statement stmnt, java.lang.String sql)
      Supply original exception and non-null Statement and/or SQL string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getErrorCode()
      Returns the error code of the underlying SQLException.
      int getIndexOfFirstFailedObject()  
      java.lang.String getSQL()
      Gets the SQL string if available.
      java.lang.String getSQLState()
      Returns the SQL state of the underlying SQLException.
      java.sql.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

        addSuppressed, fillInStackTrace, getCause, 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
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • ReportingSQLException

        public ReportingSQLException​(java.sql.SQLException sqle,
                                     java.sql.Statement stmnt,
                                     java.lang.String sql)
        Supply original exception and non-null Statement and/or SQL string.
    • Method Detail

      • getSQL

        public java.lang.String getSQL()
        Gets the SQL string if available.
      • getSQLState

        public java.lang.String getSQLState()
        Returns the SQL state of the underlying SQLException.
        Overrides:
        getSQLState in class java.sql.SQLException
      • getErrorCode

        public int getErrorCode()
        Returns the error code of the underlying SQLException.
        Overrides:
        getErrorCode in class java.sql.SQLException
      • getStatement

        public java.sql.Statement getStatement()
        Returns the Statement that caused the exception.
      • getIndexOfFirstFailedObject

        public int getIndexOfFirstFailedObject()
      • setIndexOfFirstFailedObject

        public void setIndexOfFirstFailedObject​(int index)