您的位置:首页 > 其它

How to use ELMAH to manually log errors?

2014-07-08 01:10 330 查看
http://stackoverflow.com/questions/7441062/how-to-use-elmah-to-manually-log-errorsYou can use the Elmah.ErrorSignal() method to log an issue without raising an exception.
try
{
some code
}
catch(Exception ex)
{
// log error
Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
//continue
}


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: