[#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&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stdexceptutil&period;h&gt;`

[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&hyphen;throw hook function pointer type&period;
|===


== 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&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setDomainErrorHook.adoc[`setDomainErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;domain&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setInvalidArgumentHook.adoc[`setInvalidArgumentHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;invalid&lowbar;argument` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setLengthErrorHook.adoc[`setLengthErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;length&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setLogicErrorHook.adoc[`setLogicErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;logic&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setOutOfRangeHook.adoc[`setOutOfRangeHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;out&lowbar;of&lowbar;range` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setOverflowErrorHook.adoc[`setOverflowErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;overflow&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setRangeErrorHook.adoc[`setRangeErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;range&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setRuntimeErrorHook.adoc[`setRuntimeErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;runtime&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/setUnderflowErrorHook.adoc[`setUnderflowErrorHook`] 
| Set the pre&hyphen;throw hook for `std&colon;&colon;underflow&lowbar;error` to the specified `hook`&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwDomainError.adoc[`throwDomainError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;domain&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwInvalidArgument.adoc[`throwInvalidArgument`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;invalid&lowbar;argument` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwLengthError.adoc[`throwLengthError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;length&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwLogicError.adoc[`throwLogicError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;logic&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwOutOfRange.adoc[`throwOutOfRange`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;out&lowbar;of&lowbar;range` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwOverflowError.adoc[`throwOverflowError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;overflow&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwRangeError.adoc[`throwRangeError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;range&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwRuntimeError.adoc[`throwRuntimeError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;runtime&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
| xref:BloombergLP/bslstl/StdExceptUtil/throwUnderflowError.adoc[`throwUnderflowError`]  [.small]#[noreturn]#
| Throw a `std&colon;&colon;underflow&lowbar;error` exception supplying the specified `message` as the sole argument to its constructor&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
