try{
//出错的那些代码
}catch(Exception e){}
//出错的那些代码
}catch(Exception e){}
解决方案 »
- Inappropriate OGNL expression: null
- 一个关于java输入流的问题。。
- 求助:使用tomcat6时,项目中的目录/admin下的文件无法正常使用,/admin开始的链接404
- classpath
- eclipse+tomcat 连接数据库问题
- 给每个新闻网页加上一个计数器
- POI操作excel表,当我把数据导入excel时提示:不能打开文件????郁闷那,请高手指教!!!!!!!
- 最后只关闭Statement实例而不关闭ResultSet实例行吗?
- 菜鸟问题:只玩jsp+servlet+bean,只装tomcat可以吗?
- hibernate 多条件查询(criteria) 在线等
- 菜鸟问题,嵌套JSP页面
- 谁能提供《精通EJB》第二版的电子版。。。。。。在线(急)
public void theMethod(){}
try{
//调用会抛出异常的函数!
}
catch(){
}
捕捉处理它,要不就抛到继续抛到外面一层:
比如你的当前函数是theMethod
声明的时候写成这样:
public void theMethod()throws Exception{
//调用会抛出异常的函数!
}
public void theMethod(){
try{
//调用会抛出异常的函数!
}
catch(){
}
}