我在VS2010中使用.NET 4.0。在我目前的应用程序(不是我写的),我发现有像.NET查找吃掉的异常
Try
' do something '
Catch e As Exception
' do nothing about the exception. no logging and no re-throw... =o=!!! '
End Try
一些很多代码我的问题是如何找到这种在整个应用程序“吃掉”的异常。
谢谢!
编辑:对不起,我应该说Catch块永远不是空的。有时,它可能是Return False
,Return Nothing
,Return
,Return 0
,Return ""
...
[C#:Find all empty catch catch]的可能重复(http://stackoverflow.com/questions/1486424/c-find-all-empty-catch-blocks) – 2010-12-05 23:55:03
我不认为它们是重复的。这个异常已被吃掉,并不意味着Catch块是空的。它有时可能是`Return False`,`Nothing Nothing`或有时用`Return`退出该方法。 – 2010-12-06 01:08:43