[CXX-1297] mongocxx code should throw exceptions derived from mongocxx::exception, instead of throwing mongocxx::exception itself Created: 06/Apr/17 Updated: 30/Jun/23 |
|
| Status: | Backlog |
| Project: | C++ Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Backlog - CXX Driver Team | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | error-handling | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Epic Link: | C++ Error Improvements | ||||||||
| Description |
|
Most error handling code in mongocxx throws an exception derived from mongocxx::exception, such as mongocxx::logic_error, mongocxx::operation_exception, etc. We should audit the codebase to find the remaining functions that throw mongocxx::exception directly, and replace the exceptions in those throw statements with the appropriate specific exception. Also, consider whether gridfs_exception deserves to derive from exception, as it does now, or if it should be a subclass of operation_exception, or just deleted in favor of the existing exceptions. |