Code example for SQLException

Methods: toString

0
            assertNotNull("Error creating connection",conn);
        } catch (IOException e) {
            System.out.println("Problem creating test file in " + tmp);
        } catch (SQLException e) {
            // TODO Auto-generated catch block 
            fail("Exception: " + e.toString());
        } catch (java.lang.Exception e) {
            fail("Exception: " + e.toString());
        } 
         
    } 
     
    public void tearDown() { 
        try { 
            if (!conn.isClosed()) {
                conn.close();
            } 
        } catch (SQLException e) {
            fail("Couldn't close Connection: " + e.getMessage());
        }