if (verboseJNI) VM.sysWrite("JNI called: ExceptionOccurred  \n");
if (traceJNI) VM.sysWrite("JNI called: ExceptionOccurred  \n");
  private static int ExceptionOccurred(int envJREF) {    if (verboseJNI) VM.sysWrite("JNI called: ExceptionOccurred  \n");    VM_JNIEnvironment env;    try {      env = VM_Thread.getCurrentThread().getJNIEnv();      Throwable e = env.getException();      if (e==null)        return 0;      else {        if (verboseJNI) {          VM.sysWrite( e.toString() );          VM.sysWrite("\n");        }        return env.pushJNIRef(e);      }    } catch (Throwable unexpected) {      env = VM_Thread.getCurrentThread().getJNIEnv();      env.recordException(unexpected);      if (verboseJNI) {        VM.sysWrite( unexpected.toString() );        VM.sysWrite("\n");      }      return env.pushJNIRef(unexpected);    }  }