-
Type: Task
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: 1.0.0-beta1
-
Component/s: None
-
None
Currently, WriteConcernException, which is used for "soft" write concern errors, extends WriteException, which is directly used for "hard" write errors. This makes users do something like the following if they with to ignore soft errors:
try { ... } catch (WriteConcernException $e) { // do nothing } catch (WriteException $e) { // do something }
Instead we should have:
- class WriteConcernException extends WriteException
- class WriteErrorException extends WriteException
- abstract class WriteException extends RuntimeException
Any place where we currently throw WriteException should be changed to WriteErrorException.
Any classes that extend WriteException (e.g. DuplicateKeyException) should be changed to extend WriteErrorException.