DOKK / manpages / debian 13 / libbson-doc / bson_set_error.3.en
BSON_SET_ERROR(3) libbson BSON_SET_ERROR(3)

void
bson_set_error (

bson_error_t *error, uint32_t domain, uint32_t code, const char *format, ...);


  • error: A bson_error_t.
  • domain: A uint32_t.
  • code: A uint32_t.
  • format: A printf() style format string.

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.

MongoDB, Inc

2009-present, MongoDB, Inc.

May 7, 2025 1.30.4