[JAVA-2598] com.mongodb.MongoWriteException instead of com.mongodb.DuplicateKeyException Created: 14/Sep/17 Updated: 11/Oct/18 Resolved: 11/Oct/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Write Operations |
| Affects Version/s: | 3.5.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | kant kodali | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
|
| Comments |
| Comment by Jeffrey Yemin [ 11/Oct/18 ] | |||||||
|
Changing the exception would be a breaking change for some applications, so we won't make the change you requested here. But your application can determine if a MongoWriteException is a duplicate key error with code like this:
|