Skip to content

Commit

Permalink
Added error log for response data when json parsing error occurs (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxaddict authored Feb 5, 2022
1 parent 1029024 commit a2587b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qt/navcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,9 +2056,9 @@ void NavcoinGUI::updatePrice()
info("Updating prices");

std::thread pThread{[this]{
std::string response;
try {
CURL *curl;
std::string response;
std::string url(
"https://api.coingecko.com/api/v3/simple/price?ids=nav-coin&vs_currencies="
"BTC,"
Expand Down Expand Up @@ -2164,6 +2164,7 @@ void NavcoinGUI::updatePrice()
catch (const boost::property_tree::json_parser::json_parser_error& e)
{
error("Could not parse price data json 'boost::property_tree::json_parser::json_parser_error'");
error("RAW Response: " + response);
}
catch (const std::runtime_error& e)
{
Expand Down

0 comments on commit a2587b3

Please sign in to comment.