Metoden System::Threading::Tasks::FromException

System::Threading::Tasks::FromException(const Exception&) method

Skapar en uppgift som har slutförts med ett specificerat undantag.

TaskPtr System::Threading::Tasks::FromException(const Exception &exception)
ParameterTypBeskrivning
undantagconst Exception&Undantaget som ska användas för att slutföra uppgiften.

ReturnValue

En felaktig uppgift.

Se även

System::Threading::Tasks::FromException(const Exception&) method

Skapar en uppgift som har slutförts med ett specificerat undantag och resultattyp.

template<typename TResult> RTaskPtr<TResult> System::Threading::Tasks::FromException(const Exception &exception)
ParameterBeskrivning
TResultTypen av uppgiftens resultat.
ParameterTypBeskrivning
undantagconst Exception&Undantaget som ska användas för att slutföra uppgiften.

ReturnValue

En felaktig uppgift med den specificerade resultattypen.

Se även