Closed mattfidler closed 4 years ago
I could return a SEXP: TRUE/LogicalVector(1) if everything is fine or a StringVector(1) with the error message.
Would this help?
Yes. If you do this I will add a pull request of how to use this with Rcpp. It won't add the Rcpp dependency but would be in the header. Is that OK?
Yes. If you do this I will add a pull request of how to use this with Rcpp. It won't add the Rcpp dependency but would be in the header. Is that OK?
Not sure if I understand this. In which header?
which header?
checkmate.h
In there a simple directive of
#if defined(__cplusplus)
#else
#endif
would allow qassert
to work safely with Rcpp
and C
code using the same interface.
Well, looking at your code, it would be in checkmate_stub.c
instead of the header.
Would #183 work for you?
Yes. Let me know when it arrives on CRAN so I can take out my hack :)
This is because the default is to use
Rf_error
to signal errors. This causes a longjump and is unsafe with Rcpp; Could you provide aC++
capable interface by returning the error in some way?