diff options
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/com/jogamp/gluegen/CMethodBindingEmitter.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java index fc65fb4..c1b175f 100644 --- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java +++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java @@ -409,6 +409,11 @@ public class CMethodBindingEmitter extends FunctionEmitter { // javaCallback.cbFuncCEmitter.emitBodyPassCArguments(); jcbCMethodEmitter.emitJavaCallbackBodyPassJavaArguments(javaCallback, "cb->userParam"); unit.emitln(");"); + unit.emitln(" if( (*env)->ExceptionCheck(env) ) {"); + unit.emitln(" fprintf(stderr, \"Info: Callback '"+jcbFriendlyBasename+"': Exception in Java Callback caught:\\n\");"); + unit.emitln(" (*env)->ExceptionDescribe(env);"); + unit.emitln(" (*env)->ExceptionClear(env);"); + unit.emitln(" }"); // javaCallback.cbFuncCEmitter.emitBodyUserVariableAssignments(); // javaCallback.cbFuncCEmitter.emitBodyVariablePostCallCleanup(); |