{"action":"closed","issue":{"url":"https://api.github.com/repos/brython-dev/brython/issues/843","repository_url":"https://api.github.com/repos/brython-dev/brython","labels_url":"https://api.github.com/repos/brython-dev/brython/issues/843/labels{/name}","comments_url":"https://api.github.com/repos/brython-dev/brython/issues/843/comments","events_url":"https://api.github.com/repos/brython-dev/brython/issues/843/events","html_url":"https://github.com/brython-dev/brython/issues/843","id":325366070,"number":843,"title":"sys.exc_info() returns info about the wrong exception","user":{"login":"schmave","id":868327,"avatar_url":"https://avatars2.githubusercontent.com/u/868327?v=4","gravatar_id":"","url":"https://api.github.com/users/schmave","html_url":"https://github.com/schmave","followers_url":"https://api.github.com/users/schmave/followers","following_url":"https://api.github.com/users/schmave/following{/other_user}","gists_url":"https://api.github.com/users/schmave/gists{/gist_id}","starred_url":"https://api.github.com/users/schmave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmave/subscriptions","organizations_url":"https://api.github.com/users/schmave/orgs","repos_url":"https://api.github.com/users/schmave/repos","events_url":"https://api.github.com/users/schmave/events{/privacy}","received_events_url":"https://api.github.com/users/schmave/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T16:12:45Z","updated_at":"2018-05-24T16:46:04Z","closed_at":"2018-05-24T16:46:04Z","author_association":"CONTRIBUTOR","body":"```python\r\nimport sys\r\n\r\ntry:\r\n    raise FileNotFoundError()\r\nexcept FloatingPointError:\r\n    pass\r\nexcept FileNotFoundError:\r\n    print(sys.exc_info())\r\n```\r\n\r\nExpected output: `(<class 'FileNotFoundError'>, FileNotFoundError(), <class 'traceback'>)`\r\nActual output: `(<class 'AttributeError'>, AttributeError(\"type has no attribute '__subclasscheck__'\",), <class 'traceback'>)`\r\n\r\nAs best I understand it, `__BRYTHON__.currentException` gets overwritten by the `$B.is_exc()` function that is used to check if the current exception is of type `FloatingPointError`, so that when the second handler is run, the original exception is no longer available."}}
{"actor":{"display_login":"PierreQuentel"}}