-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
In the 1.x driver, MongoExecutionTimeoutException is only thrown for maxTimeMS timeouts during queries. Command helpers may only throw MongoResultException after inspecting the command result's "ok" field. Ideally, we'd have specific exceptions for their maxTimeMS timeouts as well.
This is tricky in 1.x, since MongoExecutionTimeoutException is not an instance of MongoResultException, which users currently know to expect. Introducing a new exception in 1.x could be a BC break, so this is probably best considered for the next major version of the driver.
Note: I'm not counting MongoCursorTimeoutException here, which is thrown by everything for client-side socket timeouts.