I haven't ever tried this, but I'd start by experimenting with calling Base.showerror with jl_exception_in_transit as an argument.
--Tim On Wednesday, December 16, 2015 02:28:34 AM Kristoffer Carlsson wrote: > Hello, I've been looking at embedding some material models written in Julia > in a larger FEM project written in C++ (https://www.dealii.org/). > > I have a few questions that would make improve my workflow. > > 1.) To ease with debugging I would want to get the back trace with line > numbers from C when an exception is raised. Right now I use: > > void check_exception() { > if (jl_exception_occurred()) { > jl_show(jl_stderr_obj(), jl_exception_occurred()); > jl_printf(jl_stderr_stream(), "\n"); > return -1; > } > return 0; > } > > but this only gives me for example: > DimensionMismatch("A has dimensions (2,1) but B has dimensions (6,6)") > without any extra information. > > Is there a convenient way to also print out the back trace? > > 2. What is the status of thread safety when calling function with jl_call > from c(++)? deal.ii has very good support for implementing multithreading > so it would be nice if I could use julia multithreaded. I know that there > has been a lot of progress w.r.t thread safety on master but I am not sure > what the current status is. > > Thanks > // Kristoffer
