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

Function testUnwindProtectLambda

inst/tinytest/cpp/stack.cpp:74–79  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

72
73// [[Rcpp::export]]
74SEXP testUnwindProtectLambda(Environment indicator, bool fail) {
75 unwindIndicator my_data(indicator);
76 SEXP out = R_NilValue;
77 out = Rcpp::unwindProtect([&] () { return maybeThrow(&fail); });
78 return out;
79}
80
81struct FunctionObj {
82 FunctionObj(int data_, bool fail_) : data(data_), fail(fail_) { }

Callers

nothing calls this directly

Calls 2

unwindProtectFunction · 0.85
maybeThrowFunction · 0.85

Tested by

no test coverage detected