Skip to content

Conversation

@reactormonk
Copy link

Very basic. How would you prefer the integration with the current structure? I can't create an REngineEvalException from the JNI because I don't have access to the engine.

Long version with REngineEvalException:

  jclass clazz = (*env)->FindClass(env, "org/rosuda/REngine/REngineEvalException");
  jstring message = (*env)->NewStringUTF(env, R_curErrorBuf())
  jmethodID init = (*env)->GetMethodID(env, cls, "<init>", "(Lorg/rosuda/REngine;Ljava/lang/String;)V");
  jobject exception = (*env)->NewObject(env, clazz, init, engine, message)
  (*env)->Throw(env, exception);

@reactormonk
Copy link
Author

Anyone got time to review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant