Exceptions for flow of control

后端 未结 7 538
死守一世寂寞
死守一世寂寞 2021-01-20 14:59

There is an interesting post over here about this, in relation to cross-application flow of control.

Well, recently, I\'ve come across an interesting problem. Gener

相关标签:
7条回答
  • 2021-01-20 15:37

    Why not just return the resulting value? If it returns anything at all, assume it is successful. If it fails to return a value, then it means the loop failed.

    If you must bring back from a failure, then I'd recommend you throw an exception.

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