[#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&period; Objects of this class contain information about an allocation request&period;

== Synopsis

Declared in `&lt;bslma&lowbar;testallocatorexception&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class TestAllocatorException
    : public std::bad&lowbar;alloc
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `std::bad&lowbar;alloc`
| Exception possibly thrown by `new&period;`
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/TestAllocatorException/size_type.adoc[`size&lowbar;type`] 
| Alias for the type used by the `Allocator` protocol to request a memory allocation of a given size&period;
|===


== 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&period;
| xref:BloombergLP/bslma/TestAllocatorException/operator_assign.adoc[`operator&equals;`] 
| 
| xref:BloombergLP/bslma/TestAllocatorException/numBytes.adoc[`numBytes`] 
| Return the number of bytes (supplied at construction) that indicates an allocation request size&period;
| xref:BloombergLP/bslma/TestAllocatorException/what.adoc[`what`]  [.small]#[virtual]#
| Return a pointer to the identifying string for this exception type&period;
|===



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