diff options
| author | Po Lu | 2023-02-17 19:08:55 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-17 19:08:55 +0800 |
| commit | ecb48e8d636b043f485d3e5d75841b9c4818d4a1 (patch) | |
| tree | a87a759556c1a47ab9dbbce8972527026d535a47 /src | |
| parent | 60ed861b10fdc34bb9c888a59c6e6f75a27b77b4 (diff) | |
| download | emacs-ecb48e8d636b043f485d3e5d75841b9c4818d4a1.tar.gz emacs-ecb48e8d636b043f485d3e5d75841b9c4818d4a1.zip | |
Improve logging of Java exceptions
* src/android.c (android_exception_check): Print more detailed
information.
Diffstat (limited to 'src')
| -rw-r--r-- | src/android.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) | |||
| 4923 | { | 4923 | { |
| 4924 | if ((*android_java_env)->ExceptionCheck (android_java_env)) | 4924 | if ((*android_java_env)->ExceptionCheck (android_java_env)) |
| 4925 | { | 4925 | { |
| 4926 | __android_log_print (ANDROID_LOG_WARNING, __func__, | ||
| 4927 | "Possible out of memory error." | ||
| 4928 | " The Java exception follows: "); | ||
| 4929 | /* Describe exactly what went wrong. */ | ||
| 4930 | (*android_java_env)->ExceptionDescribe (android_java_env); | ||
| 4926 | (*android_java_env)->ExceptionClear (android_java_env); | 4931 | (*android_java_env)->ExceptionClear (android_java_env); |
| 4927 | memory_full (0); | 4932 | memory_full (0); |
| 4928 | } | 4933 | } |