View RSS Feed

Recent Blogs Posts

  1. Retrieving Exceptions

    by , 03-10-2012 at 07:58 AM
    The given code outputs the following that is contained in the SQLException or other exception which have been chained to it:
    • SQL State
    • Error description
    • Error Code
    • Cause

    Java Code:
    public static void
        printSQLException(SQLException ex) {
        for (Throwable e : ex) {
            if (e instanceof SQLException) {
                if (ignoreSQLException(
                    ((SQLException)e).
                    getSQLState()) == false)
    ...
    Categories
    JDBC