Skip to content

Commit bb3001b

Browse files
committed
more informative warning
1 parent e3d75bf commit bb3001b

File tree

1 file changed

+3
-1
lines changed
  • inst/include/Rcpp/macros

1 file changed

+3
-1
lines changed

inst/include/Rcpp/macros/mask.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525

2626
#ifndef RCPP_NO_MASK_RF_ERROR
2727
#define Rf_error(...) \
28-
_Pragma("GCC warning \"Invalid use of Rf_error, use Rcpp::stop instead\"") \
28+
_Pragma("GCC warning \"Use of Rf_error() replaced with Rcpp::stop(). Calls \
29+
to Rf_error() in C++ contexts are unsafe: consider using Rcpp::stop() instead, \
30+
or define RCPP_NO_MASK_RF_ERROR if this is a false positive.\"") \
2931
Rcpp::stop(__VA_ARGS__)
3032
#endif
3133

0 commit comments

Comments
 (0)