Skip to content

Commit

Permalink
Clear exceptions after registering natives failed
Browse files Browse the repository at this point in the history
  • Loading branch information
rovo89 committed May 9, 2014
1 parent 4a492e9 commit fb0f77d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ bool xposedOnVmCreated(JNIEnv* env, const char* className) {
ALOGE("Error while loading XTypedArray class '%s':\n", XTYPEDARRAY_CLASS);
dvmLogExceptionStackTrace();
env->ExceptionClear();
keepLoadingXposed = false;
return false;
}
xposedPrepareSubclassReplacement(xTypedArrayClass);
Expand All @@ -320,6 +319,7 @@ bool xposedOnVmCreated(JNIEnv* env, const char* className) {
ALOGI("Found Xposed class '%s', now initializing\n", XPOSED_CLASS);
if (register_de_robv_android_xposed_XposedBridge(env) != JNI_OK) {
ALOGE("Could not register natives for '%s'\n", XPOSED_CLASS);
env->ExceptionClear();
return false;
}
return true;
Expand Down Expand Up @@ -517,6 +517,8 @@ static jboolean de_robv_android_xposed_XposedBridge_initNative(JNIEnv* env, jcla
}
if (register_android_content_res_XResources(env) != JNI_OK) {
ALOGE("Could not register natives for '%s'\n", XRESOURCES_CLASS);
env->ExceptionClear();
keepLoadingXposed = false;
return false;
}

Expand Down

0 comments on commit fb0f77d

Please sign in to comment.