Skip to content

Commit 91fef0a

Browse files
committed
Move longjump error to resumeJump()
1 parent d44e42e commit 91fef0a

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

inst/include/Rcpp/exceptions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ namespace Rcpp {
152152
#if (defined(RCPP_PROTECTED_EVAL) && defined(R_VERSION) && R_VERSION >= R_Version(3, 5, 0))
153153
::R_ContinueUnwind(token);
154154
#endif
155+
Rf_error("Internal error: Rcpp longjump failed to resume");
155156
}
156157

157158
} // namespace internal

inst/include/Rcpp/macros/macros.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
} \
6868
if (rcpp_output_type == 3) { \
6969
Rcpp::internal::resumeJump(rcpp_output_condition); \
70-
Rf_error("Internal error: Rcpp longjump failed to resume"); \
7170
}
7271
#endif
7372

src/attributes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,6 @@ namespace attributes {
27822782
<< " if (rcpp_isLongjump_gen) {" << std::endl
27832783
// No need to unprotect before jump
27842784
<< " Rcpp::internal::resumeJump(rcpp_result_gen);" << std::endl
2785-
<< " Rf_error(\"Internal error: Rcpp longjump failed to resume\");" << std::endl
27862785
<< " }" << std::endl
27872786
<< " Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, \"try-error\");"
27882787
<< std::endl

0 commit comments

Comments
 (0)