]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve logging of Java exceptions
authorPo Lu <luangruo@yahoo.com>
Fri, 17 Feb 2023 11:08:55 +0000 (19:08 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 17 Feb 2023 11:08:55 +0000 (19:08 +0800)
* src/android.c (android_exception_check): Print more detailed
information.

src/android.c

index 09b9001b45da087637db7e8e0246f493fd7b43bc..c5adb912d9a4686512dd683b2933f0a6443e92e4 100644 (file)
@@ -4923,6 +4923,11 @@ android_exception_check (void)
 {
   if ((*android_java_env)->ExceptionCheck (android_java_env))
     {
+      __android_log_print (ANDROID_LOG_WARNING, __func__,
+                          "Possible out of memory error."
+                          " The Java exception follows:  ");
+      /* Describe exactly what went wrong.  */
+      (*android_java_env)->ExceptionDescribe (android_java_env);
       (*android_java_env)->ExceptionClear (android_java_env);
       memory_full (0);
     }