Provided by: libbson-doc_2.2.0-1_all 

SYNOPSIS
void
bson_set_error (
bson_error_t *error, uint32_t domain, uint32_t code, const char *format, ...);
PARAMETERS
• error: A bson_error_t <>.
• domain: A uint32_t.
• code: A uint32_t.
• 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.
Author
MongoDB, Inc
Copyright
2009-present, MongoDB, Inc.
2.2.0 Nov 26, 2025 BSON_SET_ERROR(3)