[#BloombergLP-bslma-TestAllocatorException] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::TestAllocatorException :relfileprefix: ../../ :mrdocs: This class defines an exception object for memory allocation operations. Objects of this class contain information about an allocation request. == Synopsis Declared in `<bslma_testallocatorexception.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class TestAllocatorException : public std::bad_alloc ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::bad_alloc` | Exception possibly thrown by `new.` |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/TestAllocatorException/size_type.adoc[`size_type`] | Alias for the type used by the `Allocator` protocol to request a memory allocation of a given size. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/TestAllocatorException/2constructor.adoc[`TestAllocatorException`] [.small]#[constructor]# | Create an exception object initialized with the specified `numBytes` that indicates an allocation request size. | xref:BloombergLP/bslma/TestAllocatorException/operator_assign.adoc[`operator=`] | | xref:BloombergLP/bslma/TestAllocatorException/numBytes.adoc[`numBytes`] | Return the number of bytes (supplied at construction) that indicates an allocation request size. | xref:BloombergLP/bslma/TestAllocatorException/what.adoc[`what`] [.small]#[virtual]# | Return a pointer to the string literal "bslma::TestAllocatorException" having a storage duration of the lifetime of the program. Note that the caller should _not_ attempt to free this memory. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#