electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 7ceeb7e67a20f0077f085045724061c1235d1f3b
parent 1189ed39ae99e960f0e79582976400c64f408a02
Author: ThomasV <thomasv@gitorious>
Date:   Mon, 16 Jun 2014 18:06:39 +0200

waiting dialog: handle exceptions

Diffstat:
Mgui/qt/util.py | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gui/qt/util.py b/gui/qt/util.py @@ -21,11 +21,19 @@ class WaitingDialog(QThread): self.d.show() def run(self): - self.result = self.run_task() + self.error = None + try: + self.result = self.run_task() + except Exception as e: + self.error = str(e) self.d.emit(SIGNAL('done')) def close(self): self.d.accept() + if self.error: + QMessageBox.warning(self.parent, _('Error'), self.error, _('OK')) + return + if self.on_complete: self.on_complete(*self.result)