1
0

lnbase: propagate error messages received in on_error to their relevant coroutines

This commit is contained in:
ThomasV
2018-10-07 12:19:34 +02:00
parent 11c3ca281c
commit 6f3c2b30ed
4 changed files with 27 additions and 23 deletions

View File

@@ -110,11 +110,12 @@ class ChannelsList(MyTreeWidget):
local_amt = local_amt_inp.get_amount()
push_amt = push_amt_inp.get_amount()
connect_contents = str(remote_nodeid.text()).strip()
try:
self.main_window.protect(self.open_channel, (connect_contents, local_amt, push_amt))
except ConnStringFormatError as e:
self.parent.show_error(str(e))
self.main_window.protect(self.open_channel, (connect_contents, local_amt, push_amt))
def open_channel(self, *args, **kwargs):
self.parent.wallet.lnworker.open_channel(*args, **kwargs)
import traceback, sys
try:
self.parent.wallet.lnworker.open_channel(*args, **kwargs)
except Exception as e:
traceback.print_exc(file=sys.stderr)
self.parent.show_error('Cannot open channel: %s' % str(e))