WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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