一切都很出色,直到我遇到需要捕获异常的地方。当我放置
jdbcTemplate.query(something...)
在try{}
我得到的区块:
Unreachable catch block for SQLException. This exception is never thrown from the try statement body.
在这种情况下我该怎么办?
try{
personIdReturnedByDb = jdbcTemplate.queryForInt(sql, p.getEmail(),
p.getName(), p.getSurname(), encPw, dateSql);
}
catch(SQLException sa){
}
谢谢您,