Java 8 SQLNonTransientException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SQLNonTransientException class.

This code example shows how to use the following methods:getCause, getMessage, getErrorCode, getSQLState
 
    /** 
     * @test java.sql.SQLNonTransientException(String, String, int, Throwable) 
     */ 
    public void test_Constructor_LStringLStringILThrowable_11() { 
        SQLNonTransientException sQLNonTransientException = new SQLNonTransientException(
                "MYTESTSTRING", null, -1, null); 
        assertNotNull(sQLNonTransientException);
        assertNull("The SQLState of SQLNonTransientException should be null",
                sQLNonTransientException.getSQLState());
        assertEquals(
                "The reason of SQLNonTransientException set and get should be equivalent", 
                "MYTESTSTRING", sQLNonTransientException.getMessage());
        assertEquals("The error code of SQLNonTransientException should be -1",
                sQLNonTransientException.getErrorCode(), -1);
        assertNull("The cause of SQLNonTransientException should be null",
                sQLNonTransientException.getCause());
    } 
 
    /** 

5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                    charset, info, cachePool); 
            return rrs; 
        }else{ 
            String msg = "can't find schema:" + schema.getName(); 
            LOGGER.warn(msg); 
            throw new SQLNonTransientException(msg); 
        } 
    } 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 SQLNonTransientException Methods: