阅读背景:

当您不使用异常来控制流时,代码如何看?

来源:互联网 

I've taken the advice I've seen in other answered questions about when to throw exceptions but now my APIs have new noise. Instead of calling methods wrapped in try/catch blocks (vexing exceptions) I have out argument parameters with a collection of errors that may have occurred during processing. I understand why wrapping everything in a try/catch is a bad way to control the flow of an app but I rarely see code anywhere that reflects this idea.I've taken the advice I've seen in other answer




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: