[#BloombergLP-bslstl-StdExceptUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::StdExceptUtil :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for `static` utility functions that throw standard library exceptions. == Synopsis Declared in `<bslstl_stdexceptutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct StdExceptUtil; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/StdExceptUtil/PreThrowHook.adoc[`PreThrowHook`] | Alias for the pre‐throw hook function pointer type. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/StdExceptUtil/logCheapStackTrace.adoc[`logCheapStackTrace`] | Log a warning with a cheap stack trace before an exception is thrown. | xref:BloombergLP/bslstl/StdExceptUtil/setDomainErrorHook.adoc[`setDomainErrorHook`] | Set the pre‐throw hook for `std::domain_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setInvalidArgumentHook.adoc[`setInvalidArgumentHook`] | Set the pre‐throw hook for `std::invalid_argument` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setLengthErrorHook.adoc[`setLengthErrorHook`] | Set the pre‐throw hook for `std::length_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setLogicErrorHook.adoc[`setLogicErrorHook`] | Set the pre‐throw hook for `std::logic_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setOutOfRangeHook.adoc[`setOutOfRangeHook`] | Set the pre‐throw hook for `std::out_of_range` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setOverflowErrorHook.adoc[`setOverflowErrorHook`] | Set the pre‐throw hook for `std::overflow_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setRangeErrorHook.adoc[`setRangeErrorHook`] | Set the pre‐throw hook for `std::range_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setRuntimeErrorHook.adoc[`setRuntimeErrorHook`] | Set the pre‐throw hook for `std::runtime_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/setUnderflowErrorHook.adoc[`setUnderflowErrorHook`] | Set the pre‐throw hook for `std::underflow_error` to the specified `hook`. | xref:BloombergLP/bslstl/StdExceptUtil/throwDomainError.adoc[`throwDomainError`] [.small]#[noreturn]# | Throw a `std::domain_error` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwInvalidArgument.adoc[`throwInvalidArgument`] [.small]#[noreturn]# | Throw a `std::invalid_argument` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwLengthError.adoc[`throwLengthError`] [.small]#[noreturn]# | Throw a `std::length_error` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwLogicError.adoc[`throwLogicError`] [.small]#[noreturn]# | Throw a `std::logic_error` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwOutOfRange.adoc[`throwOutOfRange`] [.small]#[noreturn]# | Throw a `std::out_of_range` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwOverflowError.adoc[`throwOverflowError`] [.small]#[noreturn]# | Throw a `std::overflow_error` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwRangeError.adoc[`throwRangeError`] [.small]#[noreturn]# | Throw a `std::range_error` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwRuntimeError.adoc[`throwRuntimeError`] [.small]#[noreturn]# | Throw a `std::runtime_error` exception supplying the specified `message` as the sole argument to its constructor. | xref:BloombergLP/bslstl/StdExceptUtil/throwUnderflowError.adoc[`throwUnderflowError`] [.small]#[noreturn]# | Throw a `std::underflow_error` exception supplying the specified `message` as the sole argument to its constructor. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#