Improving stability of asynchronous LaTeX renderer.
This commit is contained in:
parent
cf73b35a9a
commit
5313428250
3 changed files with 18 additions and 7 deletions
|
@ -53,7 +53,12 @@ class PyPromiseRunner(QRunnable):
|
|||
raise InvalidReturnValue("Must return either a primitive, a valid QObject, JS Value, or None.")
|
||||
self.promise.finished.emit(data)
|
||||
except Exception as e:
|
||||
self.promise.errored.emit(repr(e))
|
||||
try:
|
||||
self.promise.errored.emit(repr(e))
|
||||
except RuntimeError as e2:
|
||||
# Happens when the PyPromise has already been garbage collected.
|
||||
# In other words, nothing to report to nowhere.
|
||||
pass
|
||||
|
||||
|
||||
class PyPromise(QObject):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue