public IEnumerator ExceptionsThrownInTaskAreLogged() { var go = new GameObject("TestGameObject"); TestException.ExpectLog(); go.CreateTaskRunner().StartTask(Test); yield return(null); Object.Destroy(go); #pragma warning disable CS1998 async Task Test() { throw new TestException(); } #pragma warning restore CS1998 }