Usage of try/catch blocks in C++

后端 未结 8 2104
有刺的猬
有刺的猬 2020-12-08 12:01

In general, I tend to use try/catch for code which has multiple failure points for which the failures have a common handler.

In my experience, this is typically co

8条回答
  •  执笔经年
    2020-12-08 12:20

    In most languages entering and exiting a try/catch block via the normal methods is free, it's only when an exception is thrown that the exception handler looks up where to handle the exception.

提交回复
热议问题