{"action":"opened","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1107","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1107/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1107/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1107/events","html_url":"https://github.com/The-Compiler/qutebrowser/issues/1107","id":115836251,"number":1107,"title":"Handling of RuntimeError for deleted Qt objects","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/priority:%201%20-%20middle","name":"priority: 1 - middle","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-09T09:17:34Z","updated_at":"2015-11-09T09:17:34Z","closed_at":null,"body":"```\r\nqutebrowser/utils/objreg.py\r\n101:            except (RuntimeError, TypeError):\r\n\r\nqutebrowser/utils/debug.py\r\n59:        except RuntimeError:  # pragma: no cover\r\n\r\nqutebrowser/browser/signalfilter.py\r\n81:        except RuntimeError:\r\n\r\nqutebrowser/browser/webpage.py\r\n381:            except RuntimeError:\r\n396:        except RuntimeError:\r\n398:            #     RuntimeError: wrapped C/C++ object of type BrowserPage has\r\n\r\nqutebrowser/browser/network/networkmanager.py\r\n373:            except (KeyError, RuntimeError, TypeError):\r\n375:                # Catching RuntimeError and TypeError because we could be in\r\n\r\nqutebrowser/browser/webview.py\r\n172:        except RuntimeError:\r\n174:            # get: RuntimeError: wrapped C/C++ object of type WebView has been\r\n294:        except (webelem.IsNullError, RuntimeError):\r\n\r\nqutebrowser/config/configtypes.py\r\n63:        except RuntimeError:\r\n\r\nqutebrowser/mainwindow/tabbedbrowser.py\r\n129:        except RuntimeError as e:\r\n```\r\n\r\nHowever that `RuntimeError` is typically a `TypeError` in earlier PyQt versions - so we need some good way to handle this. Maybe a context manager which catches both, checks if it's *really* what we expect, and re-raises it?"}}