Skip to content

Instantly share code, notes, and snippets.

@jrwren
Created December 1, 2011 18:55
Show Gist options
  • Select an option

  • Save jrwren/1418972 to your computer and use it in GitHub Desktop.

Select an option

Save jrwren/1418972 to your computer and use it in GitHub Desktop.
ThingsThatAreNotAGoodIdeaThatIDoAnyway - ignore exceptions
public static class ThingsThatAreNotAGoodIdeaThatIDoAnyway
{
public static void IgnoreExceptions(this System.Threading.Tasks.Task task)
{
task.ContinueWith(t => t.Exception.Handle(e => true), System.Threading.Tasks.TaskContinuationOptions.OnlyOnFaulted);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment