Skip to content

Commit

Permalink
Replace std:cerr with Rcpp::stop
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed Jun 22, 2019
1 parent a98ee02 commit cc7c758
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ docs
logos
pkgdown
README.Rmd
jSDM_boral.Rmd
vignettes/jSDM_boral.Rmd
vignettes/proof.Rmd

# travis
^\.travis\.yml$
5 changes: 3 additions & 2 deletions src/Rcpp_jSDM_useful.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2670,8 +2670,9 @@ double rtnorm(
// Check if a < b
if(a>=b)
{
std::cerr<<"*** B must be greater than A ! ***"<<std::endl;
exit(1);
//std::cerr << "*** B must be greater than A ! ***" << std::endl;
//exit(1);
Rcpp::stop("*** B must be greater than A ! ***");
}

// Check if |a| < |b|
Expand Down

0 comments on commit cc7c758

Please sign in to comment.