Ray's playground

 

Item 15:Understand the costs of exception handling.(More Effective C++)

The prudent course of action is to be aware of the costs described in this item, but not to take the numbers very seriously. Whatever the cost of exception handling, you don't want to pay any more than you have to. To minimize your exception-related costs, compile without support for exceptions when that is feasible; limit your use of try blocks and exception specifications to those locations where you honestly need them; and throw exceptions only under conditions that are truly exceptional.

posted on 2011-09-30 11:57  Ray Z  阅读(193)  评论(0编辑  收藏  举报

导航