1
0

separate get_errors instead of raising an exception

This commit is contained in:
ThomasV
2014-09-06 15:06:31 +02:00
parent b82e84907e
commit 300125422d
2 changed files with 9 additions and 15 deletions

View File

@@ -941,7 +941,7 @@ class ElectrumWindow(QMainWindow):
amount = self.amount_e.get_amount()
fee = self.fee_e.get_amount()
outputs = self.payto_e.get_outputs(False)
outputs = self.payto_e.get_outputs()
if not is_fee:
fee = None
@@ -1034,12 +1034,11 @@ class ElectrumWindow(QMainWindow):
if self.payment_request:
outputs = self.payment_request.get_outputs()
else:
try:
outputs = self.payto_e.get_outputs()
except ValueError as e:
traceback.print_exc(file=sys.stdout)
self.show_message(str(e))
errors = self.payto_e.get_errors()
if errors:
self.show_warning(_("Invalid Lines found:") + "\n\n" + '\n'.join([ _("Line #") + str(x[0]+1) + ": " + x[1] for x in errors]))
return
outputs = self.payto_e.get_outputs()
if not outputs:
QMessageBox.warning(self, _('Error'), _('No outputs'), _('OK'))