title: How to get the inner exception from a cancelled task?
body: <p>I have a task that in case of an exception cancels the tasks that are using the sme cancelation token and throws an exception:</p>
  
  <pre><code>var cancellationTokenSource = new CancellationTokenSource();
  
  var task1 = Task.Factory.StartNew(
                  () =&gt;
                      {
                          try
                          {
                              // Do work 
                          }
                          catch (Exception exception)
                          {                              
                              cancellationTokenSource.Cancel();
  
                              // rethrow the error
                              throw;
                          }     
                      },
                  cancellationTokenSource.Token,
                  TaskCreationOptions.None,
                  taskScheduler); 
  </code></pre>
  
  <p>I have another task3 (return task) that is continuation on task1 and task2 and uses the same canceleation token:</p>
  
  <pre><code>return task3 =
                  Task.Factory.ContinueWhenAll(
                      new[] { task1, task2 },
                      tasks =&gt;
                          {                           
                             // Do work
                          },
                  cancellationTokenSource.Token,
                  TaskContinuationOptions.None,
                  this.taskScheduler).Unwrap();
  </code></pre>
  
  <p>Once task1 is cancelled, all task with the same cancellation token are cancelled as well.
  I need to get the inner exception that task1 throws, how it can be done?</p>