MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / maybeThrow

Function maybeThrow

inst/tinytest/cpp/stack.cpp:56–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56SEXP maybeThrow(void* data) {
57 bool* fail = (bool*) data;
58 if (*fail)
59 (Rf_error)("throw!"); // prevent masking
60 else
61 return NumericVector::create(42);
62}
63
64// [[Rcpp::export]]
65SEXP testUnwindProtect(Environment indicator, bool fail) {

Callers 2

testUnwindProtectLambdaFunction · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected