We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 138454e commit 7492cffCopy full SHA for 7492cff
inst/include/Rcpp/vector/Vector.h
@@ -299,7 +299,10 @@ class Vector :
299
* it is valid
300
*/
301
R_xlen_t offset(const R_xlen_t& i) const {
302
- if(i < 0 || i >= ::Rf_xlength(Storage::get__()) ) throw index_out_of_bounds() ;
+ if(i < 0 || i >= ::Rf_xlength(Storage::get__()) ) {
303
+ const char* fmt = "Index out of bounds: [index=%i; extent=%i].";
304
+ throw index_out_of_bounds(fmt, i, ::Rf_xlength(Storage::get__()) ) ;
305
+ }
306
return i ;
307
}
308
0 commit comments