[price-quotes] Throw instead of returning if there aren't any commodities to quote.

So that the user gets sees an error instead of silent failure.
This commit is contained in:
John Ralls 2022-10-13 13:51:37 -07:00
parent 81d4ea9550
commit 7d93774dd2

View File

@ -303,7 +303,7 @@ GncQuotesImpl::fetch (CommVec& commodities)
{
m_failures.clear();
if (commodities.empty())
return;
throw (GncQuoteException(bl::translate("GncQuotes::Fetch called with no commodities.")));
try
{
auto quote_str{query_fq (commodities)};