Skip to content

Commit 57ca9ed

Browse files
authoredSep 15, 2020
Merge pull request #61 from mapbox/kdz-print-jvm-exception
Print JVM exception in template method as well
2 parents e2bbae0 + 03b8788 commit 57ca9ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎include/jni/errors.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ namespace jni
6060
template < class R >
6161
R CheckJavaException(JNIEnv& env, R&& r)
6262
{
63-
if (env.ExceptionCheck()) throw PendingJavaException();
63+
if (env.ExceptionCheck()) {
64+
env.ExceptionDescribe();
65+
throw PendingJavaException();
66+
}
6467
return std::move(r);
6568
}
6669

0 commit comments

Comments
 (0)
Please sign in to comment.