Handle RuntimeError in AbstractTab __repr__
Apparently it can happen that we try to get a repr of an already destroyed tab. In that case, we display <RuntimeError> as the URL now.
This commit is contained in:
parent
2a3369e2fe
commit
59a1609dd8
@ -860,6 +860,6 @@ class AbstractTab(QWidget):
|
||||
try:
|
||||
url = utils.elide(self.url().toDisplayString(QUrl.EncodeUnicode),
|
||||
100)
|
||||
except AttributeError:
|
||||
url = '<AttributeError>'
|
||||
except (AttributeError, RuntimeError) as exc:
|
||||
url = '<{}>'.format(exc.__class__.__name__)
|
||||
return utils.get_repr(self, tab_id=self.tab_id, url=url)
|
||||
|
Loading…
Reference in New Issue
Block a user