I’m having a headache with this problem. I can’t accomplished that my try can catch my exception. Here is the picture.
In a moment, I was experimenting with this. And it works..
var task = client.GetAsync(uri);
try
{
task.Wait();
}
catch (Exception ex)
{
throw ex;
}
But the problem with above is the UI freezes. And I don’t want that. What could I do?

Never call
task.Wait().task.Wait()will synchronously wait for the task to finish.That will freeze the UI.
Your catch block is working, but you’re seeing the exception before it gets caught.
Uncheck the checkbox and try again, and the catch block should be triggered.