BloombergLP::bdld::Datum::createError

Return a datum holding an error with code and message.

Synopsis

Declared in <bdld_datum.h>

static
Datum
createError(
    int code,
    bslstl::StringRef const& message,
    AllocatorType const& allocator);

Description

Return, by value, a datum having a DatumError value with the specified code and the specified message, using the specified allocator to supply memory (if needed).

Return Value

a datum holding an error with code and message

Parameters

NameDescription
codeerror code
messageoptional error message
allocatormemory allocator to use