Fix: WARNING in native method: JNI call made with exception pending

If an exception is thrown from within the Java code, the "NewGlobalRef()" call caused the following warning (With option -Xcheck:jni):
WARNING in native method: JNI call made with exception pending

This change removes the native call to "NewGlobalRef()" while there's an exception and replace it with a call to "ExceptionDescribe()" which is safe while there's an exception pending.