Added an `ExceptionCheck()` followed by `ExceptionDescribe()` and `ExceptionClear()` immediately after the Java calls made from the callback function `ReadTTFontFileFunc()` in `freetypeScaler.c`.
The exception(s) need to be cleared because we're not returning immediately to Java that would've been able to handle them gracefully. And in order not to loose the exception entirely (even though the return value would also indicate an error condition), print out the exception with `ExceptionDescribe()` to aid in debugging. ------------- Commit messages: - 8269223: -Xcheck:jni WARNINGs working with fonts on Linux Changes: https://git.openjdk.java.net/jdk/pull/4572/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4572&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8269223 Stats: 83 lines in 2 files changed: 82 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/4572.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4572/head:pull/4572 PR: https://git.openjdk.java.net/jdk/pull/4572