Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If julia functions which was brought to R throws an error, no real error is thrown, but an error object is returned #216

Open
schlichtanders opened this issue Nov 17, 2023 · 2 comments

Comments

@schlichtanders
Copy link

JuliaCall does not throw errors correctly.

R> library(JuliaCall)

R> f = julia_eval('f() = error("hi")')
┌ Warning: RCall.jl: Julia version 1.9.3 at location /nix/store/n2mf5wwcjasd5wlxinrz36y0g6l0w7q8-julia-bin-1.9.3/bin will be used.Loading setup script for JuliaCall...@ RCall ~/.julia/packages/RCall/gOwEW/src/io.jl:172Warning: RCall.jl: Finish loading setup script for JuliaCall.@ RCall ~/.julia/packages/RCall/gOwEW/src/io.jl:172

R> f()
<simpleError: ErrorException("hi")>

This should throw a real error instead of returning an error object.

Do you know a workaround?

@schlichtanders
Copy link
Author

Also the error only includes the plain message. Often one also needs the stacktrace.

Please also include the stacktrace in the simpleError message when fixing this.

@schlichtanders
Copy link
Author

Turns out this is an RCall.jl problem

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

No branches or pull requests

1 participant