Provided by: libbson-doc_1.22.1-1_all bug

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.

       ┌──────────────────┬────────────────────────────────────┬──────────────────────────────────┐
       │BSON_ERROR_JSONBSON_JSON_ERROR_READ_CORRUPT_JSbson_json_reader_t tried         │
       │                  │ BSON_JSON_ERROR_READ_INVALID_PARAM │ to parse invalid MongoDB         │
       │                  │ BSON_JSON_ERROR_READ_CB_FAILURE    │ Extended JSON.  Tried to         │
       │                  │                                    │ parse   a   valid   JSON         │
       │                  │                                    │ document that is invalid         │
       │                  │                                    │ as MongoDBExtended JSON.         │
       │                  │                                    │ An   internal   callback         │
       │                  │                                    │ failure    during   JSON         │
       │                  │                                    │ parsing.                         │
       ├──────────────────┼────────────────────────────────────┼──────────────────────────────────┤
       │BSON_ERROR_READERBSON_ERROR_READER_BADFDbson_json_reader_new_from_file() │
       │                  │                                    │ could not open the file.         │
       └──────────────────┴────────────────────────────────────┴──────────────────────────────────┘

AUTHOR

       MongoDB, Inc

COPYRIGHT

       2017-present, MongoDB, Inc