summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2013-08-16 11:31:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-26 23:52:40 +0200
commitca0ec4043f20e2e2c687cdf83ca5df5608c1b066 (patch)
treed371681cc63bb5a2e2e74dd322e5fb4c8e239243 /src/platformsupport
parent1db13907d938c8e1f4e5c47f009030a69f793127 (diff)
JNI Convenience: Print exceptions in debug mode.
The exception message might contain valuable information about what went wrong, so we should print the message. Change-Id: I50c986d4c18cf6115017fcc92363c946be45024d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/jniconvenience/qjniobject.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/platformsupport/jniconvenience/qjniobject.cpp b/src/platformsupport/jniconvenience/qjniobject.cpp
index 1d0bb435aa..ecf247aabf 100644
--- a/src/platformsupport/jniconvenience/qjniobject.cpp
+++ b/src/platformsupport/jniconvenience/qjniobject.cpp
@@ -57,6 +57,9 @@ static jclass getCachedClass(JNIEnv *env, const char *className)
jclass c = env->FindClass(className);
if (env->ExceptionCheck()) {
c = 0;
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif // QT_DEBUG
env->ExceptionClear();
}
if (c)
@@ -88,6 +91,9 @@ static jmethodID getCachedMethodID(JNIEnv *env,
if (env->ExceptionCheck()) {
id = 0;
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif // QT_DEBUG
env->ExceptionClear();
}
@@ -117,6 +123,9 @@ static jfieldID getCachedFieldID(JNIEnv *env,
if (env->ExceptionCheck()) {
id = 0;
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif // QT_DEBUG
env->ExceptionClear();
}