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 a316619 commit 46434d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inst/include/stan/io/json/rapidjson_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,17 @@ struct RapidJSONHandler {
*/
template <typename Handler>
void rapidjson_parse(std::istream &in, Handler &handler) {
Rcpp::Rcout << "f421" << std::endl;
rapidjson::Reader reader;
RapidJSONHandler<Handler> filter(handler);
rapidjson::IStreamWrapper isw(in);
Rcpp::Rcout << "f422" << std::endl;
handler.start_text();
Rcpp::Rcout << "f423" << std::endl;
if (!reader.Parse<rapidjson::kParseNanAndInfFlag
| rapidjson::kParseValidateEncodingFlag
| rapidjson::kParseFullPrecisionFlag>(isw, filter)) {
Rcpp::Rcout << "f424" << std::endl;
rapidjson::ParseErrorCode err = reader.GetParseErrorCode();
std::stringstream ss;
ss << "Error in JSON parsing " << std::endl
Expand All @@ -127,6 +131,7 @@ void rapidjson_parse(std::istream &in, Handler &handler) {
}
throw json_error(ss.str());
}
Rcpp::Rcout << "f425" << std::endl;
handler.end_text();
}
} // namespace json
Expand Down

0 comments on commit 46434d6

Please sign in to comment.