Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 876b7d8f authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Properly describe exception

Previously we used DetachCurrentThread which raised a SIGABRT from
within ART. The new approach is to use ExceptionDescribe and exit.

Bug: 20640601

(cherry picked from commit d12065f5)

Change-Id: I00126b678ff296e0076247554af8328fe2767038
parent 354b70f7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -200,10 +200,8 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg)
         * that can be made while an exception is pending, so we want to
         * get the VM ptr, throw the exception, and then detach the thread.
         */
        JavaVM* vm = jnienv_to_javavm(env);
        env->Throw(excep);
        vm->DetachCurrentThread();
        sleep(60);
        env->ExceptionDescribe();
        ALOGE("Forcefully exiting");
        exit(1);
    }