[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:
Related
related to CXX-834 Return local mongoc errors and server... Backlog
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.


Generated at Wed Feb 07 22:02:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.