public class com.mongodb.MongoCommandException extends com.mongodb.MongoServerException
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.mongodb.MongoCommandException
super_class: com.mongodb.MongoServerException
{
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 8160676451944215078
private final org.bson.BsonDocument response;
descriptor: Lorg/bson/BsonDocument;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(org.bson.BsonDocument, com.mongodb.ServerAddress);
descriptor: (Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokestatic com.mongodb.MongoCommandException.extractErrorCode:(Lorg/bson/BsonDocument;)I
1: ldc "Command failed with error %s: '%s' on server %s. The full response is %s"
iconst_4
anewarray java.lang.Object
dup
iconst_0
aload 1
invokestatic com.mongodb.MongoCommandException.extractErrorCodeAndName:(Lorg/bson/BsonDocument;)Ljava/lang/String;
aastore
dup
iconst_1
2: aload 1
invokestatic com.mongodb.MongoCommandException.extractErrorMessage:(Lorg/bson/BsonDocument;)Ljava/lang/String;
aastore
dup
iconst_2
aload 2
aastore
dup
iconst_3
aload 1
invokestatic com.mongodb.MongoCommandException.getResponseAsJson:(Lorg/bson/BsonDocument;)Ljava/lang/String;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
4: aload 2
invokespecial com.mongodb.MongoServerException.<init>:(ILjava/lang/String;Lcom/mongodb/ServerAddress;)V
5: aload 0
aload 1
putfield com.mongodb.MongoCommandException.response:Lorg/bson/BsonDocument;
6: aload 1
ldc "errorLabels"
new org.bson.BsonArray
dup
invokespecial org.bson.BsonArray.<init>:()V
invokevirtual org.bson.BsonDocument.getArray:(Ljava/lang/Object;Lorg/bson/BsonArray;)Lorg/bson/BsonArray;
invokevirtual org.bson.BsonArray.iterator:()Ljava/util/Iterator;
astore 4
goto 9
StackMap locals: com.mongodb.MongoCommandException org.bson.BsonDocument com.mongodb.ServerAddress top java.util.Iterator
StackMap stack:
7: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.bson.BsonValue
astore 3
start local 3 8: aload 0
aload 3
invokevirtual org.bson.BsonValue.asString:()Lorg/bson/BsonString;
invokevirtual org.bson.BsonString.getValue:()Ljava/lang/String;
invokevirtual com.mongodb.MongoCommandException.addLabel:(Ljava/lang/String;)V
end local 3 9: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
10: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/MongoCommandException;
0 11 1 response Lorg/bson/BsonDocument;
0 11 2 address Lcom/mongodb/ServerAddress;
8 9 3 curErrorLabel Lorg/bson/BsonValue;
MethodParameters:
Name Flags
response final
address final
public int getErrorCode();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.MongoCommandException.getCode:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/MongoCommandException;
public java.lang.String getErrorCodeName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.MongoCommandException.response:Lorg/bson/BsonDocument;
invokestatic com.mongodb.MongoCommandException.extractErrorCodeName:(Lorg/bson/BsonDocument;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/MongoCommandException;
public java.lang.String getErrorMessage();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.MongoCommandException.response:Lorg/bson/BsonDocument;
invokestatic com.mongodb.MongoCommandException.extractErrorMessage:(Lorg/bson/BsonDocument;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/MongoCommandException;
public org.bson.BsonDocument getResponse();
descriptor: ()Lorg/bson/BsonDocument;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.MongoCommandException.response:Lorg/bson/BsonDocument;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/MongoCommandException;
private static java.lang.String getResponseAsJson(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: new java.io.StringWriter
dup
invokespecial java.io.StringWriter.<init>:()V
astore 1
start local 1 1: new org.bson.json.JsonWriter
dup
aload 1
invokespecial org.bson.json.JsonWriter.<init>:(Ljava/io/Writer;)V
astore 2
start local 2 2: new org.bson.codecs.BsonDocumentCodec
dup
invokespecial org.bson.codecs.BsonDocumentCodec.<init>:()V
aload 2
aload 0
invokestatic org.bson.codecs.EncoderContext.builder:()Lorg/bson/codecs/EncoderContext$Builder;
invokevirtual org.bson.codecs.EncoderContext$Builder.build:()Lorg/bson/codecs/EncoderContext;
invokevirtual org.bson.codecs.BsonDocumentCodec.encode:(Lorg/bson/BsonWriter;Lorg/bson/BsonDocument;Lorg/bson/codecs/EncoderContext;)V
3: aload 1
invokevirtual java.io.StringWriter.toString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 commandResponse Lorg/bson/BsonDocument;
1 4 1 writer Ljava/io/StringWriter;
2 4 2 jsonWriter Lorg/bson/json/JsonWriter;
MethodParameters:
Name Flags
commandResponse final
private static java.lang.String extractErrorCodeAndName(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.MongoCommandException.extractErrorCode:(Lorg/bson/BsonDocument;)I
istore 1
start local 1 1: aload 0
invokestatic com.mongodb.MongoCommandException.extractErrorCodeName:(Lorg/bson/BsonDocument;)Ljava/lang/String;
astore 2
start local 2 2: aload 2
invokevirtual java.lang.String.isEmpty:()Z
ifeq 4
3: iload 1
invokestatic java.lang.Integer.toString:(I)Ljava/lang/String;
areturn
4: StackMap locals: int java.lang.String
StackMap stack:
ldc "%d (%s)"
iconst_2
anewarray java.lang.Object
dup
iconst_0
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 2
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 response Lorg/bson/BsonDocument;
1 5 1 errorCode I
2 5 2 errorCodeName Ljava/lang/String;
MethodParameters:
Name Flags
response final
private static int extractErrorCode(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
ldc "code"
new org.bson.BsonInt32
dup
iconst_m1
invokespecial org.bson.BsonInt32.<init>:(I)V
invokevirtual org.bson.BsonDocument.getNumber:(Ljava/lang/Object;Lorg/bson/BsonNumber;)Lorg/bson/BsonNumber;
invokevirtual org.bson.BsonNumber.intValue:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 response Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
response final
private static java.lang.String extractErrorCodeName(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
ldc "codeName"
new org.bson.BsonString
dup
ldc ""
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.getString:(Ljava/lang/Object;Lorg/bson/BsonString;)Lorg/bson/BsonString;
invokevirtual org.bson.BsonString.getValue:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 response Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
response final
private static java.lang.String extractErrorMessage(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "errmsg"
new org.bson.BsonString
dup
ldc ""
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.getString:(Ljava/lang/Object;Lorg/bson/BsonString;)Lorg/bson/BsonString;
invokevirtual org.bson.BsonString.getValue:()Ljava/lang/String;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: new com.mongodb.MongoInternalException
dup
ldc "This value should not be null"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.lang.String
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 response Lorg/bson/BsonDocument;
1 4 1 errorMessage Ljava/lang/String;
MethodParameters:
Name Flags
response final
}
SourceFile: "MongoCommandException.java"
InnerClasses:
public final Builder = org.bson.codecs.EncoderContext$Builder of org.bson.codecs.EncoderContext