( ) .
- , await. :
try
{
await task;
}
catch (Exception e)
{
}
( ), task.Wait(), AggregateException, , InnerExceptions , (.. task.ContinueWith(t => // handle exception))
UnobservedTaskException
.Net 4.0 Task . TaskScheduler.UnobservedTaskException ( UnhandledException). .Net 4.5 , , .
( , ), <ThrowUnobservedTaskExceptions enabled="true"/>, . , :
- .Net , , - , ( , ). , .
- , , .
await . UnobservedTaskException , .