程序包 org.hibernate

类 JDBCException

    • 构造器详细资料

      • JDBCException

        public JDBCException​(String message,
                             SQLException cause)
        Constructs a JDBCException using the given information.
        参数:
        message - The message explaining the exception condition
        cause - The underlying cause
      • JDBCException

        public JDBCException​(String message,
                             SQLException cause,
                             String sql)
        Constructs a JDBCException using the given information.
        参数:
        message - The message explaining the exception condition
        cause - The underlying cause
        sql - The sql being executed when the exception occurred
    • 方法详细资料

      • getSQLState

        public String getSQLState()
        Get the X/Open or ANSI SQL SQLState error code from the underlying SQLException.
        返回:
        The X/Open or ANSI SQL SQLState error code; may return null.
        另请参阅:
        SQLException.getSQLState()
      • getSQL

        public String getSQL()
        Get the actual SQL statement being executed when the exception occurred.
        返回:
        The SQL statement; may return null.