Is there a free alternative to Exception hunter?

前端 未结 3 438
花落未央
花落未央 2020-12-13 11:42

I\'m switching back and forth between Java and C# and one thing I miss while I\'m coding in C# is the enforced exception checking (Although I admit I also find it really irr

相关标签:
3条回答
  • 2020-12-13 11:54

    Yes. Run the free Microsoft Pex on your code. It will show all possible exceptions that can be thrown.

    0 讨论(0)
  • 2020-12-13 11:56

    Get Exceptional website is one possibility. Basic idea is that you create software and all exceptions are sent to this site to your account where you can pick them up. Of course it doesn't read your code and see what exceptions are there.

    I don't know if there is C# library yet but the API is not too hard.

    0 讨论(0)
  • 2020-12-13 12:08

    While I understand the enforced exceptions thing, I'm not sure how genuinely essential it is... for example, most interesting exceptions are those that you wouldn't normally include (or even expect). For example, I'm currently fighting what looks very much like a CLI bug in CF35, intermittently raising MethodMissingException from code that really does exist (emphasis: intermittently).

    If you want to document your exceptions, use the ///<exception ... >...</exception> markup. For other thoughts on this theme, perhaps see Vexing Exceptions (I wonder if GhostDoc might help any?)

    0 讨论(0)
提交回复
热议问题