/// <summary> /// Does the async keyword affect the Exception? If we remove the async keyword from the async task that we are executing /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void MakeTeaAsyncWithExceptionWithoutAwait_OnClick(object sender, RoutedEventArgs e) { BeforeMakingTea(); try { _finalMessage = new StringBuilder(); _finalMessage.AppendLine("Making tea started."); // Will go inside the method. Will execute everything that has been established. When it reaches the await it will come back to the caller. MakeTeaAsyncWithException.MakeMeTeaAsyncInTryCatch(); _finalMessage.AppendLine("After calling the method async"); Notes.Text = _finalMessage.ToString(); } catch (Exception exception) { // Why we are not seeing the exception in the Notes? // If we don't use the await keyword, the exception will be swallowed. await keyword will validate that the task // completed successfully, but in this case, there's no await keyword. Moreover, there's no continuation and that's why we // can see that is not "async" and the next message is shown. Notes.Text = exception.Message; } AfterMakingTea(); }