-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:all
-
Major Change
There is currently no way to know whether a bson operation succeeded or failed aside from if the program has exited or not. A different setup by which errors could be handled in the calling program would be preferable.
Currently, most functions in the api return the bson* or bson_buffer* they were provided and exit() on error. In most cases, these pointers are not useful. One possible solution involves returning negative errors on failure, with the option to register an abortive error handler callback.
This type of change would break old code, but make future code significantly more robust.