[#BloombergLP-bslstl-Function_InvokerUtil-throwBadFunctionCall] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Function_InvokerUtil.adoc[Function_InvokerUtil]::throwBadFunctionCall :relfileprefix: ../../../ :mrdocs: Throw a `bsl::bad_function_call` exception in an exception‐enabled build; otherwise, invoke the currently installed assertion violation handler. Note that providing a function to throw an exception moves the code generated to throw the exception into just one place rather than inline in every function template instantiation that would call it. It also insulates the header files from the declaration of the exception class itself, so that only clients catching `bad_function_call` need to include its header. == Synopsis Declared in `<bslstl_function_invokerutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[noreturn]] static void throwBadFunctionCall(); ---- == Return Value [NOTE] ==== This function https://en.cppreference.com/cpp/language/attributes/noreturn[does not return^]. ==== [.small]#Created with https://www.mrdocs.com[MrDocs]#