Skip to content

Commit b640fab

Browse files
committed
Replaced Rf_errorwith Rcpp::stop
1 parent c24dc50 commit b640fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/RcppWrapper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ DataFrame matchPsInternal(std::vector<double> propensityScores, std::vector<int>
4646
} catch (std::exception &e) {
4747
forward_exception_to_r(e);
4848
} catch (...) {
49-
::Rf_error("c++ exception (unknown reason)");
49+
Rcpp::stop("c++ exception (unknown reason)");
5050
}
5151
return DataFrame::create();
5252
}
@@ -62,7 +62,7 @@ std::vector<double> aucWithCi(std::vector<double> propensityScores, std::vector<
6262
} catch (std::exception &e) {
6363
forward_exception_to_r(e);
6464
} catch (...) {
65-
::Rf_error("c++ exception (unknown reason)");
65+
Rcpp::stop("c++ exception (unknown reason)");
6666
}
6767
std::vector<double> auc(3,0);
6868
return auc;
@@ -79,7 +79,7 @@ double aucWithoutCi(std::vector<double> propensityScores, std::vector<int> treat
7979
} catch (std::exception &e) {
8080
forward_exception_to_r(e);
8181
} catch (...) {
82-
::Rf_error("c++ exception (unknown reason)");
82+
Rcpp::stop("c++ exception (unknown reason)");
8383
}
8484
return 0.0;
8585
}
@@ -104,7 +104,7 @@ DataFrame adjustedKm(const std::vector<double> &weight, const std::vector<int> &
104104
} catch (std::exception &e) {
105105
forward_exception_to_r(e);
106106
} catch (...) {
107-
::Rf_error("c++ exception (unknown reason)");
107+
Rcpp::stop("c++ exception (unknown reason)");
108108
}
109109
return DataFrame::create();
110110
}

0 commit comments

Comments
 (0)