Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ / /
C 드라이버
/ /

오류 처리

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 오류를 생성한 하위 시스템의 이름을 지정합니다.

  • error.code 도메인별 오류 유형입니다.

  • error.message 오류를 설명합니다.

일부 오류 코드는 다른 오류 코드와 겹칩니다. 항상 도메인과 코드를 모두 확인하여 오류 유형을 확인합니다.

BSON_ERROR_JSON

BSON_JSON_ERROR_READ_CORRUPT_JS BSON_JSON_ERROR_READ_INVALID_PARAM BSON_JSON_ERROR_READ_CB_FAILURE

bson_json_reader_t tried to parse invalid MongoDB Extended JSON. Tried to parse a valid JSON document that is invalid as MongoDBExtended JSON. An internal callback failure during JSON parsing.

BSON_ERROR_READER

BSON_ERROR_READER_BADFD

bson_json_reader_new_from_file could not open the file.

돌아가기

BSON 문서