Consider this example
var task =Task.Factory.StartNew(()=>Console.WriteLine("test"));
task.ContinueWith(antecendent =>
{
ExceptionProcessor.HandleError(task.Exception.Flatten());
}, TaskContinuationOptions.OnlyOnFaulted);
In this example resharper predicts that there is a possible null pointer exception in task.Exception.Flatten() as it assumes task.Exception could be null .
But for all realistic scenarios it is not going to be null as the parameter TaskContinuationOptions.OnlyOnFaulted ensures the method gets called only when an exception occurs.
So How do I tell Resharper to ignore all similar warnings ?
Resharper support team has accepted this as a bug and it can be tracked here http://youtrack.jetbrains.com/issue/RSRP-316492