Skip to content

Commit

Permalink
Increased logs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Dec 24, 2023
1 parent cdce232 commit af2b9f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inst/include/cmdstan/command_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,19 @@ using shared_context_ptr = std::shared_ptr<stan::io::var_context>;
* @param file A system file to read from
*/
inline shared_context_ptr get_var_context(const std::string &file) {
Rcpp::Rcout << "f1" << std::endl;
if (file.empty()) {
return std::make_shared<stan::io::empty_var_context>();
}
Rcpp::Rcout << "f2" << std::endl;
std::ifstream stream = safe_open(file);
Rcpp::Rcout << "f3" << std::endl;
if (get_suffix(file) == ".json") {
Rcpp::Rcout << "f4" << std::endl;
stan::json::json_data var_context(stream);
Rcpp::Rcout << "f5" << std::endl;
return std::make_shared<stan::json::json_data>(var_context);
Rcpp::Rcout << "f6" << std::endl;
}
Rcpp::Rcerr
<< "Warning: file '" << file
Expand Down

0 comments on commit af2b9f1

Please sign in to comment.