private static void TestExceptions() { AsyncThrower.HandleSthExceptional().Wait(); Console.WriteLine("First exception handled!"); AsyncThrower.HandleSthExceptionalInTheVoid(); Console.WriteLine("Second exception handled!"); }
public void TestAsyncException() { AsyncThrower thrower = null; AddStep("add thrower", () => Child = thrower = new AsyncThrower(typeof(Exception))); AddUntilStep("wait for exception", () => thrower.ThrownException != null); assertCorrectStack(() => thrower.ThrownException); }
public async Task <ActionResult> ShowExceptionThrown() { await AsyncThrower.DoSthExceptional(); return(Content("This is never sent")); }
public async Task <ActionResult> ShowExceptionSwallowed() { AsyncThrower.DoSthExceptionalInTheVoid(); return(Content("This is actually sent")); }