Todo es brillante hasta que encuentro un lugar donde realmente necesito detectar excepciones. Cuando colocospring jdbc ¿Cómo se detecta la excepción?
jdbcTemplate.query(something...)
en
try{}
bloque consigo:
Unreachable catch block for SQLException. This exception is never thrown from the try statement body.
¿Qué hago en esta situación?
try{
personIdReturnedByDb = jdbcTemplate.queryForInt(sql, p.getEmail(),
p.getName(), p.getSurname(), encPw, dateSql);
}
catch(SQLException sa){
}
gracias,
No hay ninguna SQLExcepciones; Spring los envuelve en una RuntimeException; Olvidé el nombre de clase raíz. –
debe hacer que una respuesta. – hvgotcodes