env->CallVoidMethod(javaParser, processingInstructionMethod, javaTarget,
javaInstructionData);
- // We have to temporarily clear an exception before we can release local
- // references.
- jthrowable exception = env->ExceptionOccurred();
- if (exception != NULL) {
- env->ExceptionClear();
- }
-
env->DeleteLocalRef(javaInstructionData);
-
- if (exception != NULL) {
- env->Throw(exception);
- }
}
/**
jniThrowExpatException(env, XML_GetErrorCode(parser));
}
- // We have to temporarily clear an exception before we can release local
- // references.
- jthrowable exception = env->ExceptionOccurred();
- if (exception) {
- env->ExceptionClear();
- env->ReleaseStringChars(xml, characters);
- env->Throw(exception);
- } else {
- env->ReleaseStringChars(xml, characters);
- }
+ env->ReleaseStringChars(xml, characters);
context->object = NULL;
context->env = NULL;
jniThrowExpatException(env, XML_GetErrorCode(parser));
}
- // We have to temporarily clear an exception before we can release local
- // references.
- jthrowable exception = env->ExceptionOccurred();
- if (exception) {
- env->ExceptionClear();
- env->ReleaseCharArrayElements(xml, characters, JNI_ABORT);
- env->Throw(exception);
- } else {
- env->ReleaseCharArrayElements(xml, characters, JNI_ABORT);
- }
+ env->ReleaseCharArrayElements(xml, characters, JNI_ABORT);
context->object = NULL;
context->env = NULL;
jniThrowExpatException(env, XML_GetErrorCode(parser));
}
- // We have to temporarily clear an exception before we can release local
- // references.
- jthrowable exception = env->ExceptionOccurred();
- if (exception) {
- env->ExceptionClear();
- env->ReleaseByteArrayElements(xml, bytes, JNI_ABORT);
- env->Throw(exception);
- } else {
- env->ReleaseByteArrayElements(xml, bytes, JNI_ABORT);
- }
+ env->ReleaseByteArrayElements(xml, bytes, JNI_ABORT);
context->object = NULL;
context->env = NULL;