emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android ecb48e8d636 3/5: Improve logging of Java exceptions


From: Po Lu
Subject: feature/android ecb48e8d636 3/5: Improve logging of Java exceptions
Date: Fri, 17 Feb 2023 06:16:22 -0500 (EST)

branch: feature/android
commit ecb48e8d636b043f485d3e5d75841b9c4818d4a1
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Improve logging of Java exceptions
    
    * src/android.c (android_exception_check): Print more detailed
    information.
---
 src/android.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/android.c b/src/android.c
index 09b9001b45d..c5adb912d9a 100644
--- a/src/android.c
+++ b/src/android.c
@@ -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);
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]