mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -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
|
||||
|
||||
def write(self, data):
|
||||
print data.encode("utf-8"),
|
||||
try:
|
||||
print data.encode("utf-8"),
|
||||
except:
|
||||
print data
|
||||
self.pool += data
|
||||
self.poolUpdated = time.time()
|
||||
|
||||
|
@ -191,7 +194,10 @@ Please do not file a bug report with Anki.<br>""")
|
|||
diag.setLayout(layout)
|
||||
text = QTextEdit()
|
||||
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)
|
||||
box = QDialogButtonBox(QDialogButtonBox.Close)
|
||||
layout.addWidget(box)
|
||||
|
|
Loading…
Reference in a new issue