On Sat, Feb 8, 2020 at 3:45 PM Joshua N Pritikin <jpriti...@pobox.com> wrote:
> On Sat, Feb 08, 2020 at 03:28:22PM -0500, JJ Allaire wrote: > > Agreed that it would be good to have more clear docs here. Note > > that as Dirk pointed out both Writing R Extensions and > > RcppParallel docs are pretty clear about the fact that you > > shouldn't call any R APIs when in a background thread. > > Rcpp::stop superficially looks like a nice way to throw C++ exceptions > that also does printf style message formatting. I didn't realize that > it calls R APIs until I looked at the implementation. > That's a good point, I had forgotten about the printf stuff which is a good reason to prefer it to "regular" exceptions. > Sure, but does it *have* to be that way? It seems to me that > exceptions.h line 40, > > rcpp_set_stack_trace(Shield<SEXP>(stack_trace())) > Not sure about whether this is indeed a mandatory constraint (I didn't work on the stack trace bit).
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel