diff --git a/gnucash/gnome/dialog-price-edit-db.cpp b/gnucash/gnome/dialog-price-edit-db.cpp index 2d60fec620..7d906d95e7 100644 --- a/gnucash/gnome/dialog-price-edit-db.cpp +++ b/gnucash/gnome/dialog-price-edit-db.cpp @@ -569,7 +569,7 @@ gnc_prices_dialog_get_quotes_clicked (GtkWidget *widget, gpointer data) { gnc_unset_busy_cursor(nullptr); PERR("Price retrieval failed: %s", err.what()); - gnc_error_dialog(GTK_WINDOW(pdb_dialog), _("Price retrieval failed: %s"), err.what()); + gnc_error_dialog(GTK_WINDOW(pdb_dialog->window), _("Price retrieval failed: %s"), err.what()); } /* Without this, the summary bar on the accounts tab diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp index bd19d270d2..31c8cf6ca8 100644 --- a/libgnucash/app-utils/gnc-quotes.cpp +++ b/libgnucash/app-utils/gnc-quotes.cpp @@ -728,7 +728,7 @@ GncQuotesImpl::parse_quotes (const std::string& quote_str) { bpt::ptree pt; std::istringstream ss {quote_str}; - const char* what = nullptr; + std::string what; try { @@ -747,15 +747,26 @@ GncQuotesImpl::parse_quotes (const std::string& quote_str) } catch (...) { std::string error_msg{_("Failed to parse result returned by Finance::Quote.")}; + error_msg += "\n"; + //Translators: This labels the return value of a query to Finance::Quote written in an error. + error_msg += _("Result:"); + error_msg += "\n"; + error_msg += quote_str; throw(GncQuoteException(error_msg)); } - if (what) + if (!what.empty()) { std::string error_msg{_("Failed to parse result returned by Finance::Quote.")}; error_msg += "\n"; + //Translators: This is the error message reported by the Online Quotes processing code. error_msg += _("Error message:"); error_msg += "\n"; error_msg += what; + error_msg += "\n"; + //Translators: This labels the return value of a query to Finance::Quote written in an error. + error_msg += _("Result:"); + error_msg += "\n"; + error_msg += quote_str; throw(GncQuoteException(error_msg)); } return pt;