-
-
Couldn't load subscription status.
- Fork 38
Open
Description
The current version of the AsyncCommand rethrows any exception that occurs in the task run by the command.
In the following code
public AsyncCommandsDemoViewModel(IDataClient dataClient)
{
this.CancelGetData = new CancelCommand();
this.GetData = new AsyncCommand(
this.CancelGetData.Wrap(
async cancellationToken =>
this.Data = await dataClient.GetDataAsync(cancellationToken)));
}
If the GetDataAsync throws any exception it will be propagated to the UI thread causing the application to crash.
Metadata
Metadata
Assignees
Labels
No labels