Boost logo

Boost :

From: Jesse Jones (jejones_at_[hidden])
Date: 2001-03-19 19:47:21

>Another aside: Please note that nothrow operations are a cornerstone of
>exception-safe code. One great value of assertions is that they can be used
>liberally without fear of affecting the shipping program's efficiency or
>semantics (assuming side-effects are avoided). If we start using assertions
>which may sometimes throw, we will have to account for the fact that a
>sequence of operations that might have been nothrow suddenly loses that
>property. The program is now expected to be able to function correctly (or
>at least recover) when arbitrary operations have been interrupted by
>exceptions. I don't like this complication, and would prefer to very
>carefully distinguish a throw from an assert().

Well it's not like having asserts throw is going to magicly make programmer
errors recoverable. Presumbably clients are enabling throwing because they
don't want the program to silently return bad results, but they also don't
want to simply shut the app down. So all that they are doing is playing the
percentages and hoping that the app will remain useable even if one of two
features sometimes wind up asserting. The exception afety issues just
reduce that chance by a bit...

  -- Jesse

Boost list run by bdawes at, gregod at, cpdaniel at, john at