1BSON_ERROR_T(3)                     Libbson                    BSON_ERROR_T(3)
2
3
4

NAME

6       bson_error_t - bson_error_t
7
8       BSON Error Encapsulation
9

SYNOPSIS

11          #include <bson/bson.h>
12
13          typedef struct {
14             uint32_t domain;
15             uint32_t code;
16             char message[504];
17          } bson_error_t;
18

DESCRIPTION

20       The  bson_error_t  structure  is used as an out-parameter to pass error
21       information to the caller. It should be stack-allocated  and  does  not
22       requiring freeing.
23
24       See Handling Errors.
25

EXAMPLE

27          bson_reader_t *reader;
28          bson_error_t error;
29
30          reader = bson_reader_new_from_file ("dump.bson", &error);
31          if (!reader) {
32             fprintf (
33                stderr, "ERROR: %d.%d: %s\n", error.domain, error.code, error.message);
34          }
35

AUTHOR

37       MongoDB, Inc
38
40       2017-present, MongoDB, Inc
41
42
43
44
451.15.2                           Nov 06, 2019                  BSON_ERROR_T(3)
Impressum