try&catch

try&catch

1 try
2 {
3     ...
4 }
5 catch(Exception e)
6 {
7     //记录日志,便于查错,可将e.Message作为错误信息返回
8     LogHelper.ErrorLog("...错误原因为:"+ e.Message);
9 }

 

posted @ 2017-05-31 11:08  wisdomns  Views(91)  Comments(0Edit  收藏  举报