BSON_SET_ERROR(3)

NAME
bson_set_error()

SYNOPSIS
void
bson_set_error (bson_error_t *error,
                uint32_t      domain,
                uint32_t      code,
                const char   *format,
                ...) BSON_GNUC_PRINTF (4, 5);

PARAMETERS

.B error
    A bson_error_t .

.B domain
    A uint32_t .

.B code
    A uint32_t .

.B format
    A printf() style format string.

DESCRIPTION
This is a helper function to set the parameters of a bson_error_t . It handles the case where error is NULL by doing nothing.

COLOPHON
This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.