bson_errors man page

Handling_Errors — 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.

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.

None
BSON_JSON_ERROR_READ_CORRUPT_JS bson_json_reader_t tried to parse invalid MongoDB Extended JSON.
BSON_JSON_ERROR_READ_INVALID_PARAM
Tried to parse a valid JSON document that is invalid as MongoDBExtended JSON.
BSON_JSON_ERROR_READ_CB_FAILURE
An internal callback failure during JSON parsing.
None
BSON_ERROR_READER_BADFD bson_json_reader_new_from_file could not open the file.

Colophon

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

Info

2016‐11‐12 libbson