{"action":"created","issue":{"url":"https://api.github.com/repos/mattflo/NSpec/issues/88","labels_url":"https://api.github.com/repos/mattflo/NSpec/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/mattflo/NSpec/issues/88/comments","events_url":"https://api.github.com/repos/mattflo/NSpec/issues/88/events","html_url":"https://github.com/mattflo/NSpec/issues/88","id":103919128,"number":88,"title":"Exception thrown in afterAll (and beforeAll) not registered in Example.Exception","user":{"login":"BrainCrumbz","id":3185573,"avatar_url":"https://avatars.githubusercontent.com/u/3185573?v=3","gravatar_id":"","url":"https://api.github.com/users/BrainCrumbz","html_url":"https://github.com/BrainCrumbz","followers_url":"https://api.github.com/users/BrainCrumbz/followers","following_url":"https://api.github.com/users/BrainCrumbz/following{/other_user}","gists_url":"https://api.github.com/users/BrainCrumbz/gists{/gist_id}","starred_url":"https://api.github.com/users/BrainCrumbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrainCrumbz/subscriptions","organizations_url":"https://api.github.com/users/BrainCrumbz/orgs","repos_url":"https://api.github.com/users/BrainCrumbz/repos","events_url":"https://api.github.com/users/BrainCrumbz/events{/privacy}","received_events_url":"https://api.github.com/users/BrainCrumbz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":52,"created_at":"2015-08-30T11:23:08Z","updated_at":"2015-12-07T14:47:53Z","closed_at":"2015-12-07T13:34:18Z","body":"From a quick check, it seems that when an exception is thrown within `afterAll` hook, the corresponding `Example.Exception` remains null. \r\nFrom a first look during a debug session, `Example.AssignProperException()` is invoked **before** `RunAndHandleException(RunAfterAll, nspec, ref Exception)` in `Context.Run()`. Thus `AssignProperException` receives a null `contextException` and it thinks everything's ok, so `Example.Exception` remains null. \r\n\r\nWe did not check by debug, but from existing tests in async branch the same thing should behave differently for `beforeAll`. When an exception is thrown in there, the `Example.Exception` should be set.\r\n\r\nIs that intended?"},"comment":{"url":"https://api.github.com/repos/mattflo/NSpec/issues/comments/162545447","html_url":"https://github.com/mattflo/NSpec/issues/88#issuecomment-162545447","issue_url":"https://api.github.com/repos/mattflo/NSpec/issues/88","id":162545447,"user":{"login":"BrainCrumbz","id":3185573,"avatar_url":"https://avatars.githubusercontent.com/u/3185573?v=3","gravatar_id":"","url":"https://api.github.com/users/BrainCrumbz","html_url":"https://github.com/BrainCrumbz","followers_url":"https://api.github.com/users/BrainCrumbz/followers","following_url":"https://api.github.com/users/BrainCrumbz/following{/other_user}","gists_url":"https://api.github.com/users/BrainCrumbz/gists{/gist_id}","starred_url":"https://api.github.com/users/BrainCrumbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrainCrumbz/subscriptions","organizations_url":"https://api.github.com/users/BrainCrumbz/orgs","repos_url":"https://api.github.com/users/BrainCrumbz/repos","events_url":"https://api.github.com/users/BrainCrumbz/events{/privacy}","received_events_url":"https://api.github.com/users/BrainCrumbz/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T14:47:53Z","updated_at":"2015-12-07T14:47:53Z","body":":+1: "}}