|
BDE 4.14.0 Production release
|
Provide an implementation of uncaught_exceptions .
Canonical header: bsl_exception.h
This component defines a function bsl::uncaught_exceptions. For C++17 and later, this is an alias for std::uncaught_exceptions. Before C++17, we emulate the functionality.
In this section we show intended use of this component.
Suppose we have a class that does some processing in it's destructor, but we don't want to do this if an exception is "in flight". bslmt::OnceGuard is an example of this kind of functionality.
First, we create a class with an int d_exception_count member variable, and record the number of in-flight exceptions in the constructor.
Then, we implement the destructor