void forward_exception_to_r( const std::exception& ex){ SEXP condition = PROTECT(exception_to_r_condition(ex)) ; SEXP stop_sym = Rf_install( "stop" ) ; SEXP expr = PROTECT( Rf_lang2( stop_sym , condition ) ); UNPROTECT(2) ; Rf_eval( expr, R_GlobalEnv ) ; }
void forward_exception_to_r__impl( const std::exception& ex){ SEXP stop_sym = Rf_install( "stop" ) ; Scoped<SEXP> condition = exception_to_r_condition(ex) ; Scoped<SEXP> expr = Rf_lang2( stop_sym , condition ); Rf_eval( expr, R_GlobalEnv ) ; }