|
I think createDecryptionContext, createDataKeyContext, createExplicitEncryptionContext, and createExplicitDecryptionContext throw the wrong exception when mongocrypt_ctx_new fails:
mongocrypt_ctx_t context = mongocrypt_ctx_new(wrapped);
|
if (context == null) {
|
MongoCryptContextImpl.throwExceptionFromStatus(context);
|
}
|
https://github.com/mongodb/libmongocrypt/blob/1.0.0-beta2/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptImpl.java#L153
Should be:
mongocrypt_ctx_t context = mongocrypt_ctx_new(wrapped);
|
if (context == null) {
|
throwExceptionFromStatus();
|
}
|
|