/** * This is final simply as a hint to the compiler, it may be un-finalized * safely. */ public final SQLException toSQLException(Exception e) { if (e instanceof SQLException) { return (SQLException) e; } return new CausedSQLException(e); }
/** * @param cause */ public CausedSQLException(Throwable cause) { super(); initCause(cause); } }
public SQLException toSQLException(Exception e) { if (e instanceof SQLException) { return (SQLException) e; } return new CausedSQLException(e); }
/** * @param cause */ public CausedSQLException(Throwable cause) { super(cause.toString()); initCause(cause); } }
/** * This is final simply as a hint to the compiler, it may be un-finalized * safely. */ public final SQLException toSQLException(Exception e) { if (e instanceof SQLException) { return (SQLException) e; } return new CausedSQLException(e); }
/** * @param cause */ public CausedSQLException(Throwable cause) { super(cause.toString()); initCause(cause); } }
public void testGetCause() { Exception runtime = new RuntimeException("test"); Exception sqlException = new CausedSQLException(runtime); assertSame(runtime, sqlException.getCause()); assertTrue(sqlException instanceof SQLException); } }
public void testGetCause() { Exception runtime = new RuntimeException("test"); Exception sqlException = new CausedSQLException(runtime); assertSame(runtime, sqlException.getCause()); assertTrue(sqlException instanceof SQLException); } }
public void testGetCause() { Exception runtime = new RuntimeException("test"); Exception sqlException = new CausedSQLException(runtime); assertSame(runtime, sqlException.getCause()); assertTrue(sqlException instanceof SQLException); } }