MONGOC_CLIENT_..._SET_ERROR_API(3)
π MONGOC_CLIENT_..._SET_ERROR_API(3) π
okay so bestie, this is a libmongoc page, and the star of the show is mongoc_client_pool_set_error_api β the function that tells the C Driver how it should be reporting errors π«Ά
β¨ SYNOPSIS β¨
bool
mongoc_client_pool_set_error_api (mongoc_client_pool_t *client,
int32_t version);
This is your one-stop setup call for configuring how the C Driver reports errors π (peep Setting the Error API Version for the full lore on that).
π PARAMETERS π
poolβ amongoc_client_pool_t. (yes, the synopsis calls itclient, the parameter list calls itpoolβ same energy, it's the pool, we move π )versionβ the version of the error API you want, and it's gotta be eitherMONGOC_ERROR_API_VERSION_LEGACYorMONGOC_ERROR_API_VERSION_2. those are the only two options, no cap π¦
πΈ RETURNS πΈ
Returns true if the error API version was set successfully πβ¨ β but if version is invalid, it logs an error message and returns false. so like, invalid input = sad boi hours, check your return value fr fr π
π¦ THREAD SAFETY π¦
ngl this is the important one, so listen up:
This function can only be called once on a pool, and it must be called before the first call to mongoc_client_pool_pop().
like, once. one time only. and before you pop a client, periodt πβ°
π AUTHOR π
MongoDB, Inc β icons only π
π COPYRIGHT π
2009-present, MongoDB, Inc. π
and that's the whole vibe check bestie π mwah π β this page was served up by libmongoc 2.5.6, dated Oct 09, 202, see you in the next man page π¦β¨πΈ
π¦ where this page comes from
- epel 10: mongo-c-driver-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