<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 6:26 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Tim,<br>
<br>
Step back for a second and recognise that everything happens via<br>
<br>
   SEXP .Call(SEXP a, SEXP b, ...)<br>
<br>
where R calls your C++ routine asynchronously.<br>
<br>
You can do tricks _within the subroutine that is called_ which is essentially<br>
what happens via the automatically-added try/catch block we have in C++.  And<br>
Rcpp::stop() is just a shortcut for using those.<br></blockquote><div><br></div><div>Can I throw a condition (meaning an object inheriting class "condition") or am I limited to strings? If I throw a condition, will it be raised as such?</div>

<div><br></div><div>THK</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Beyond .Call() you just have what "Writing R Extension" describes in Section<br>
6.2 "Error handling", the forementioned error() and warning() [ which we<br>
prefix with Rf_ as not-namespace-protected error() clashes too easily with<br>
macros or functions in other libraries ]<br>
<br>
Any other really low-hanging fruits would probably have been picked by other<br>
Rcpp users.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
<br>
--<br>
<a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><a href="http://www.keittlab.org/" target="_blank">http://www.keittlab.org/</a></div>
</div></div>