.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 關注
- 717 瀏覽
添加回答
舉報
0/150
提交
取消