Throw OOM exception with error status

Bug: 260283480
Test: Manual
Change-Id: I36e1befbf4fabd8f8204186f563ca8f4ecbaf993
This commit is contained in:
Winson Chung
2023-02-14 01:04:33 +00:00
parent 62a7561e95
commit b9e748648d

View File

@@ -428,7 +428,7 @@ static jlong nativeCreate(JNIEnv* env, jclass clazz, jobject sessionObj,
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
return 0;
} else if (err != NO_ERROR) {
jniThrowException(env, OutOfResourcesException, NULL);
jniThrowException(env, OutOfResourcesException, statusToString(err).c_str());
return 0;
}