What does: throw 0 do/mean? Is it “bad”?

前端 未结 3 904
伪装坚强ぢ
伪装坚强ぢ 2021-01-11 18:25

Context

I came across some code, like this:

if( Some_Condition ) throw 0;

I googled a bit, and found a few other code snippets us

3条回答
  •  借酒劲吻你
    2021-01-11 19:00

    It is not special, you can thow int just as an exception class.

    It is considered a poor style, because an exception class can tell more about what actually happened.

提交回复
热议问题