git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1189ed3
)
waiting dialog: handle exceptions
author
ThomasV
<thomasv@gitorious>
Mon, 16 Jun 2014 16:06:39 +0000 (18:06 +0200)
committer
ThomasV
<thomasv@gitorious>
Mon, 16 Jun 2014 16:06:39 +0000 (18:06 +0200)
gui/qt/util.py
patch
|
blob
|
history
diff --git
a/gui/qt/util.py
b/gui/qt/util.py
index
e6c13a8
..
9139136
100644
(file)
--- 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)