public User find(String username,String password){
try {
……………………
return user;


} catch (DocumentException e) {
// throw new RuntimeException(e);
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();


}
会提示必须返回User类型的结果
而修改为
public User find(String username,String password){
try {
……………………
return user;


} catch (Exception e) {
 throw new RuntimeException(e);



}
却没有报错,请问为什么?return语句不都是在try中吗?