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 d12065f581)

Change-Id: I00126b678ff296e0076247554af8328fe2767038
This commit is contained in:
Mathieu Chartier
2015-04-28 16:30:30 -07:00
parent 354b70f7d2
commit 876b7d8fa8

View File

@@ -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);
}