Skip to content

Commit 7492cff

Browse files
committed
one more exception message fix
1 parent 138454e commit 7492cff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

inst/include/Rcpp/vector/Vector.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ class Vector :
299299
* it is valid
300300
*/
301301
R_xlen_t offset(const R_xlen_t& i) const {
302-
if(i < 0 || i >= ::Rf_xlength(Storage::get__()) ) throw index_out_of_bounds() ;
302+
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+
}
303306
return i ;
304307
}
305308

0 commit comments

Comments
 (0)