【发布时间】:2012-01-18 19:58:20
【问题描述】:
在我遇到我确实需要捕获异常的地方之前,一切都很棒。当我放置
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){
}
谢谢,
【问题讨论】: