.net不知是如何处理的?或各位在实际中是如何处理异常的。
2 回答
桃花长相依
TA贡献1860条经验 获得超8个赞
处理.一般的try catch..和winform一样.
try{
发生异常的代码;
}
catcha(Exception ex)
{
threw ex;
//在web页面代码页的话
//Page.ClientScript.RegisterStartupScript(this.GetType(), "jse", "alert('" + ex.Message + "')", true);
}在其它逻辑层的,就直接throw。在前台代码页捕捉,并友好提示。
- 2 回答
- 0 关注
- 751 浏览
添加回答
举报
0/150
提交
取消
