MONGOC_BULKWRITEEXCEPTION_ERROR(3)

πŸ’… MONGOC_BULKWRITEEXCEPTION_ERROR(3) πŸ’…

okay so bestie, this one lives in libmongoc β€” yes, the C driver for MongoDB, we love her β€” and it's a tiny little function that's basically a vibe check on your bulk write exception 🫢


✨ SYNOPSIS ✨

bool
mongoc_bulkwriteexception_error (const mongoc_bulkwriteexception_t *self, bson_error_t *error);

like. that's it. that's the whole signature. two args, one bool out, iconic behavior πŸ‘‘


🌸 DESCRIPTION 🌸

okay so here's the tea πŸ“ β€” you call mongoc_bulkwriteexception_error() on your mongoc_bulkwriteexception_t *self and it tells you whether there was a top-level error.

  • if there was a top-level error β†’ it returns true and sets error for you πŸ’–
  • if there wasn't β†’ it returns false and you can go about your day ✨

literally that's the whole deal. no cap. the bson_error_t *error out-param is only getting filled in when the answer is true, so don't be reading uninitialized error values and then @-ing me about it πŸ˜­πŸ™ˆ

ngl, "top-level" is the key word here β€” this is about the top-level error specifically, not every nested little thing inside the exception. the manpage is very clear and so am I πŸ’…

πŸ¦‹ AUTHOR πŸ¦‹

MongoDB, Inc β€” yes, the MongoDB, Inc. main character energy fr fr πŸ”₯


2009-present, MongoDB, Inc. β€” that's a long reign, we stan a legacy πŸ‘‘


and that's the whole page, bestie!! 🧚✨ this little beauty is from version 2.5.6, dated Oct 09, and it's giving "small function, big responsibility." go forth and check ya errors πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from