On Tue, 2015-02-17 at 17:53 -0700, JJ Allaire wrote:
> One piece of immediate feedback on your initial implementation: you
> can't call Rf_error from C++ code (as it will bypass C++ destructors
> on the stack). Rather, you should throw Rcpp::exception.

Hi JJ:

Ok, this puzzles me.  We can't call Rf_error from C++ code, but we can
call it from within the exception handler, right?  It would seem so
since Dirk has written a nice gallery post that does it that way...
http://gallery.rcpp.org/articles/intro-to-exceptions

Just my $0.02, but I would stick to exceptions and avoid assert in C++.

Rodney



_______________________________________________
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

Reply via email to