Rcpp try and error