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

Function get_exception_classes

inst/include/Rcpp/exceptions.h:298–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298inline SEXP get_exception_classes( const std::string& ex_class) {
299 Rcpp::Shield<SEXP> res( Rf_allocVector( STRSXP, 4 ) );
300
301 #ifndef RCPP_USING_UTF8_ERROR_STRING
302 SET_STRING_ELT( res, 0, Rf_mkChar( ex_class.c_str() ) ) ;
303 #else
304 SET_STRING_ELT( res, 0, Rf_mkCharLenCE( ex_class.c_str(), ex_class.size(), CE_UTF8 ) );
305 #endif
306 SET_STRING_ELT( res, 1, Rf_mkChar( "C++Error" ) ) ;
307 SET_STRING_ELT( res, 2, Rf_mkChar( "error" ) ) ;
308 SET_STRING_ELT( res, 3, Rf_mkChar( "condition" ) ) ;
309 return res;
310}
311
312inline SEXP make_condition(const std::string& ex_msg, SEXP call, SEXP cppstack, SEXP classes){
313 Rcpp::Shield<SEXP> res( Rf_allocVector( VECSXP, 3 ) ) ;

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected