| 296 | } |
| 297 | |
| 298 | inline 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 | |
| 312 | inline SEXP make_condition(const std::string& ex_msg, SEXP call, SEXP cppstack, SEXP classes){ |
| 313 | Rcpp::Shield<SEXP> res( Rf_allocVector( VECSXP, 3 ) ) ; |
no test coverage detected