经过检查的异常在C#中捕 [英] Checked exception catching in C#
本文介绍了经过检查的异常在C#中捕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Java要求你捕获所有可能的例外或者宣布在方法签名抛出。这是不是与C#的情况,但我仍然觉得这是一个很好的做法,以捕获所有异常。有谁知道一个工具,它可以处理一个C#项目,并指出哪里抛出一个异常,但没有抓到的地方?
Java requires that you catch all possible exceptions or declare them as thrown in the method signature. This isn't the case with C# but I still feel that it is a good practice to catch all exceptions. Does anybody know of a tool which can process a C# project and point out places where an exception is thrown but not caught?
推荐答案
退房ExceptionFinder插件由Jason博克为.net反射。它做你要找的。这里有一个screeny:
Check out the ExceptionFinder plug-in by Jason Bock for the .NET Reflector. It does just what you are looking for. Here's a screeny:
检查出来的 codePLEX
这篇关于经过检查的异常在C#中捕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文