Boost logo

Boost :

Subject: Re: [boost] [exception] uncaught_exception_count, scope(failure), scope(success)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-02-05 22:30:51

On Tuesday 05 February 2013 16:32:33 Emil Dotchevski wrote:
> I was asking specifically how uncaught_exception_count would be used.

I'm using uncaught_exception_count in a few places of Boost.Log to implement
guards that do the main work in destructor and only when an exception is not
being thrown. For instance, this expression:

  BOOST_LOG(lg) << foo();

will create a guard object that will collect the result of foo into a stream
and emit a log record on destructor if foo doesn't throw.

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