BSON_ERROR_T(3)
π BSON Error Encapsulation π
okay so bestie, welcome to the libbson manual page for BSON_ERROR_T(3) β this is the whole vibe on how BSON wraps up its error info for you. π«Ά
β¨ SYNOPSIS β¨
#include <bson/bson.h>
typedef struct {
uint32_t domain;
uint32_t code;
char message[504];
} bson_error_t;
πΈ DESCRIPTION πΈ
The bson_error_t structure is literally your little error-info delivery package β itβs used as an out-parameter to pass error information back to the caller. π¦β¨
Stack-allocate it, bestie. It should be stack-allocated, and it does not require freeing. No cleanup era needed. π
See Handling Errors. iykyk.
π¦ EXAMPLE π¦
bson_reader_t *reader;
bson_error_t error;
reader = bson_reader_new_from_file ("dump.bson", &error);
if (!reader) {
fprintf (
stderr, "ERROR: %d.%d: %s\n", error.domain, error.code, error.message);
}
π AUTHOR π
MongoDB, Inc.
π COPYRIGHT π
2009-present, MongoDB, Inc.
xoxo, your libbson bestie π β version 2.5.6, dated Oct 09, 2026, page BSON_ERROR_T(3), slaying as always. πβ¨
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms