[#BloombergLP-bsls-BslExceptionUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::BslExceptionUtil :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for `static` utility functions that throw standard library exceptions. == Synopsis Declared in `<bsls_bslexceptionutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BslExceptionUtil; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/BslExceptionUtil/throwBadAlloc.adoc[`throwBadAlloc`] [.small]#[noreturn]# | Throw a `bsl::bad_alloc` exception if exceptions are enabled in the current build mode, otherwise abort the program. `bsl::bad_alloc` will be an alias for the platform's `std::bad_alloc` class, to ensure both ABI and API compatibility with non‐BDE code relying on the standard exception hierarchy. | xref:BloombergLP/bsls/BslExceptionUtil/throwBadCast.adoc[`throwBadCast`] [.small]#[noreturn]# | Throw a `bsl::bad_cast` exception if exceptions are enabled in the current build mode, otherwise abort the program. `bsl::bad_cast` will be an alias for the platform's `std::bad_cast` class, to ensure both ABI and API compatibility with non‐BDE code relying on the standard exception hierarchy. | xref:BloombergLP/bsls/BslExceptionUtil/throwBadException.adoc[`throwBadException`] [.small]#[noreturn]# | Throw a `bsl::bad_exception` exception if exceptions are enabled in the current build mode, otherwise abort the program. `bsl::bad_exception` will be an alias for the platform's `std::bad_exception` class, to ensure both ABI and API compatibility with non‐BDE code relying on the standard exception hierarchy. | xref:BloombergLP/bsls/BslExceptionUtil/throwBadTypeid.adoc[`throwBadTypeid`] [.small]#[noreturn]# | Throw a `bsl::bad_typeid` exception if exceptions are enabled in the current build mode, otherwise abort the program. `bsl::bad_typeid` will be an alias for the platform's `std::bad_typeid` class, to ensure both ABI and API compatibility with non‐BDE code relying on the standard exception hierarchy. | xref:BloombergLP/bsls/BslExceptionUtil/throwException.adoc[`throwException`] [.small]#[noreturn]# | Throw a `bsl::exception` exception if exceptions are enabled in the current build mode, otherwise abort the program. `bsl::exception` will be an alias for the platform's `std::exception` class, to ensure both ABI and API compatibility with non‐BDE code relying on the standard exception hierarchy. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#