Skip to content

Commit 63178a5

Browse files
committed
JAVA-1368: Deprecated WriteConcernException constructor and getCommandResult method
1 parent edd4b18 commit 63178a5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/com/mongodb/WriteConcernException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public class WriteConcernException extends MongoException {
2929
* Construct a new instance with the CommandResult from getlasterror command
3030
*
3131
* @param commandResult the command result
32+
* @deprecated for internal use only, this constructor will be removed in the next major release
3233
*/
34+
@Deprecated
3335
public WriteConcernException(final CommandResult commandResult) {
3436
this(commandResult.getCode(), commandResult);
3537
}
@@ -43,7 +45,9 @@ public WriteConcernException(final CommandResult commandResult) {
4345
* Gets the getlasterror command result document.
4446
*
4547
* @return the command result
48+
* @deprecated use the exception message to get details of the exception
4649
*/
50+
@Deprecated
4751
public CommandResult getCommandResult() {
4852
return commandResult;
4953
}

0 commit comments

Comments
 (0)