If it appears to the treasurer that there is danger of an ultimate loss accruing to the bondholders for any reason, he or she shall withhold payment on all matured bonds and interest and report the facts to the legislative body so that proper action may be taken by that body to equitably protect all bondholders.