mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
more robust error reporting
This commit is contained in:
parent
222eb7aeff
commit
56e8e4b3eb
1 changed files with 8 additions and 2 deletions
|
@ -135,7 +135,10 @@ class AnkiQt(QMainWindow):
|
||||||
self.poolUpdated = 0
|
self.poolUpdated = 0
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
print data.encode("utf-8"),
|
try:
|
||||||
|
print data.encode("utf-8"),
|
||||||
|
except:
|
||||||
|
print data
|
||||||
self.pool += data
|
self.pool += data
|
||||||
self.poolUpdated = time.time()
|
self.poolUpdated = time.time()
|
||||||
|
|
||||||
|
@ -191,7 +194,10 @@ Please do not file a bug report with Anki.<br>""")
|
||||||
diag.setLayout(layout)
|
diag.setLayout(layout)
|
||||||
text = QTextEdit()
|
text = QTextEdit()
|
||||||
text.setReadOnly(True)
|
text.setReadOnly(True)
|
||||||
text.setHtml(txt + "<div style='white-space: pre-wrap'>" + error + "</div>")
|
try:
|
||||||
|
text.setHtml(txt + "<div style='white-space: pre-wrap'>" + error + "</div>")
|
||||||
|
except:
|
||||||
|
text.setHtml("couldn't set error")
|
||||||
layout.addWidget(text)
|
layout.addWidget(text)
|
||||||
box = QDialogButtonBox(QDialogButtonBox.Close)
|
box = QDialogButtonBox(QDialogButtonBox.Close)
|
||||||
layout.addWidget(box)
|
layout.addWidget(box)
|
||||||
|
|
Loading…
Reference in a new issue