Skip to content
makolyte

makolyte

Solve real coding problems

  • About
  • C#
  • SQL

task-continuewith

C# – Handle a faulted Task’s exception

01/26/202511/23/2020 by Mak

When a Task throws an exception and stops running, it has faulted. The question is, how do you get the exception that was thrown from the faulted Task? This depends on if you’re awaiting the Task or not. This article shows how to handle a faulted Task’s exception in two scenarios: when you’re awaiting the … Read more

Categories C# Tags async, await, gettype, task, task-continuewith, task-run, try-catch
About โ€ข Privacy Policy
© 2025 makolyte