[GODRIVER-2134] Unnecessary error checking on decoder setContext and Reset Created: 18/Aug/21 Updated: 27/Oct/23 Resolved: 02/Sep/21 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Sultan Da | Assignee: | Benji Rewis (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Comments |
| Comment by Backlog - Core Eng Program Management Team [ 02/Sep/21 ] |
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information. |
| Comment by Benji Rewis (Inactive) [ 18/Aug/21 ] |
|
Hello sultan.kz19991@gmail.com and thanks for your report! To clarify, are you asking that we modify the function signatures (de/en)coder.SetContext, (de/en)coder.SetRegistry and (de/en)coder.SetContext to return void instead of error? That would be a backwards-breaking API change, unfortunately, so we probably won't do that. Or, are you asking that we stop checking the return value of those functions when they are called internally in the Go driver? That would not be backwards-breaking, but if we ever modified the functions to actually return an error, we'd be at risk for ignoring the new error value accidentally. I do agree that it's odd these functions return error. They're quite old, so I don't have full context on that design decision, but one argument I can see is for "future-proofing". If we ever change the internal logic of those functions such that they now return errors, the function signature won't have to change and API won't be broken. |