How can I determine which exceptions can be thrown by a given method?

前端 未结 9 1005
感情败类
感情败类 2020-11-30 22:41

My question is really the same as this one \"Finding out what exceptions a method might throw in C#\". However, I would really like to know if anyone knows of a way to deter

9条回答
  •  情话喂你
    2020-11-30 23:22

    My methodology for this type of situation is to handle all the exceptions that I want to and then override the UnhandledException event of the application to log any other's that I don't know about. Then if I come up against any that I think I could possibly resolve then I would just update accordingly.

    Hope that helps!

提交回复
热议问题