Boost logo

Boost :

From: Leo Landa (leo_at_[hidden])
Date: 2007-09-14 20:56:53


I think this idea could shine in designs where there is dependency
injection, and the injected code needs to signal an abort of such a kind
that no implementation of the primary code would be able to circumvent.

Consider a unit testing framework used for some production unit tests. The
tests "top" invokes production code, which in turn invokes injected code.
The injected code finds a problem. Now the error needs to be communicated
up, all the way to the framework at the top through the production code,
without things like "catch(...)" in production code circumventing this
process.

What the top could do is another story - use its tricky knowledge how to
disarm the sticky exception, or simply produce enough of a graceful output
and still abort...

But I think this would be useful, although very counter-intuitive for those
who haven't familiarized themselves with the idea.

Leo.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk