We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I created an issue at JuliaCall however after a first inspection, I think it is actually an RCall issue.
Concretely something in the following is not raising julia errors when run on R. Also the stacktrace is not reported.
RCall.jl/src/callback.jl
Lines 122 to 147 in 69c22dd
Looking into JuliaCall's error handling, there are two places:
function docall(call1) try # ... catch e Rerror(e, stacktrace(catch_backtrace())).p; end; end
r <- .julia$do.call_(jcall) if (inherits(r, "error")) stop(r)
Both these steps would need to be replicated inside the conversion of a Julia Function to an R function.
The text was updated successfully, but these errors were encountered:
I found where the julia error object is transformed into a simpleError, skipping stacktrace entirely
Line 61 in 69c22dd
this should be changed to the RCall equivalent of JuliaCall's
err = Rerror(e, stacktrace(catch_backtrace())).p;
Sorry, something went wrong.
The second step needed is to surround the following with the if (inherits(r, "error")) stop(r) logic
if (inherits(r, "error")) stop(r)
Lines 132 to 135 in 69c22dd
Unfortunately, I couldn't find a way yet how to add such if else logic from Julia.
I fixed the one part for me now, but it seems juliaCallback cannot be fixed outside of RCall itself.
juliaCallback
As soon as I call setup_callbacks() again and run a typical failing example
setup_callbacks()
julia_eval('() = error("fail")')()
I get the following error (or sometimes also a Segmentation fault)
ERROR: UndefVarError: `error_msg` not defined
I bet this has something todo with creating C functions and would be solved if this is officially fixed in RCall.jl
Successfully merging a pull request may close this issue.
I created an issue at JuliaCall however after a first inspection, I think it is actually an RCall issue.
Concretely something in the following is not raising julia errors when run on R. Also the stacktrace is not reported.
RCall.jl/src/callback.jl
Lines 122 to 147 in 69c22dd
Helpful steps to provide error support
Looking into JuliaCall's error handling, there are two places:
Both these steps would need to be replicated inside the conversion of a Julia Function to an R function.
The text was updated successfully, but these errors were encountered: