[CDRIVER-17] return value / error reporting overhaul Created: 28/Jun/10 Updated: 19/Oct/16 Resolved: 07/Jul/11 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.4 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | dan k | Assignee: | Kyle Banker |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
all |
||
| Backwards Compatibility: | Major Change |
| Description |
|
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. |
| Comments |
| Comment by auto [ 01/Jun/11 ] |
|
Author: {u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}Message: |
| Comment by auto [ 01/Jun/11 ] |
|
Author: {u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}Message: |
| Comment by auto [ 19/May/11 ] |
|
Author: {u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}Message: |