我在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