[Rcpp-commits] r2685 - pkg/Rcpp/inst/examples/functionCallback
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 3 01:03:11 CET 2010
Author: romain
Date: 2010-12-03 01:03:11 +0100 (Fri, 03 Dec 2010)
New Revision: 2685
Modified:
pkg/Rcpp/inst/examples/functionCallback/RcppFunctionCallExample.cpp
Log:
cleaning
Modified: pkg/Rcpp/inst/examples/functionCallback/RcppFunctionCallExample.cpp
===================================================================
--- pkg/Rcpp/inst/examples/functionCallback/RcppFunctionCallExample.cpp 2010-12-03 00:00:24 UTC (rev 2684)
+++ pkg/Rcpp/inst/examples/functionCallback/RcppFunctionCallExample.cpp 2010-12-03 00:03:11 UTC (rev 2685)
@@ -60,7 +60,6 @@
RcppExport SEXP RCppFunctionCallWrapper(SEXP params, SEXP numvec, SEXP fnvec) {
SEXP rl = R_NilValue; // Use this when there is nothing to be returned.
- char* exceptionMesg = NULL;
try {
RcppParams rparam(params); // Get parameters in params.
@@ -84,13 +83,10 @@
rl = rs.getReturnList(); // Get the list to be returned to R.
} catch(std::exception& ex) {
- exceptionMesg = copyMessageToR(ex.what());
+ forward_exception_to_r(ex);
} catch(...) {
- exceptionMesg = copyMessageToR("unknown reason");
+ Rf_error( "unknown reason" );
}
- if(exceptionMesg != NULL)
- Rf_error(exceptionMesg);
-
return rl;
}
More information about the Rcpp-commits
mailing list