bson_errors(3)

Handling Errors

Section 3 libbson-doc bookworm source

Description

BSON_ERRORS

NAME

bson_errors - Handling Errors

DESCRIPTION

Many libbson functions report errors by returning NULL or -1 and filling out a bson_error_t structure with an error domain, error code, and message.

error.domain names the subsystem that generated the error.

error.code is a domain-specific error type.

error.message describes the error.

Some error codes overlap with others; always check both the domain and code to determine the type of error.

Image grohtml-16313-1.png

AUTHOR

MongoDB, Inc

COPYRIGHT

2017-present, MongoDB, Inc