Quick Links:

bal | bbl | bdl | bsl

Defines

bsls_exceptionutil.h File Reference

Provide simplified exception constructs for non-exception builds. More...

Go to the source code of this file.

Defines

#define BSLS_TRY   if (1)
#define BSLS_CATCH(X)   else if (0)
#define BSLS_THROW(X)
#define BSLS_RETHROW
#define BSLS_EXCEPTION_SPEC(SPEC)
#define BSLS_NOTHROW_SPEC
#define BSLS_EXCEPTION_VIRTUAL_NOTHROW

Detailed Description


Define Documentation

#define BSLS_TRY   if (1)
#define BSLS_CATCH (   X  )     else if (0)
#define BSLS_THROW (   X  ) 
Value:
BSLS_ASSERT_INVOKE_NORETURN(                        \
                                                "Tried to throw " #X         \
                                                " with exceptions disabled");
#define BSLS_RETHROW
Value:
BSLS_ASSERT_INVOKE_NORETURN(                         \
                                           "Tried to re-throw exception "    \
                                           "with exceptions disabled");
#define BSLS_EXCEPTION_SPEC (   SPEC  ) 
#define BSLS_NOTHROW_SPEC
#define BSLS_EXCEPTION_VIRTUAL_NOTHROW

The exception specification that overrides of the exception::what() virtual method should use. It is a separate macro from BSLS_NOTHROW_SPEC because the GNU library unconditionally declares the function throw(), regardless if exceptions are enabled or not - and overrides must do the same.