This question is locked. New answers and comments are not allowed.
RadDiagnostics reports for AggregateException are next to useless, I've found. Since it doesn't dig into the list of actual exceptions from Task-called code, all you know is that an exception occurred somewhere in your app (if you're lucky the stack trace might give some clue as to where, but it's just as often a trace of something in the framework code and not the application). However, all is not lost. The following code packages up the type, message, and stack trace of each exception wrapped by AggregateException, allowing you to find out where in your program problems are occurring.
Telerik, could you see to getting this into RadDiagnostics (for WP7 too, since BCL.Async lets us do all this TAP async coding there too)?
void
Diagnostics_ExceptionOccurred(
object
sender, ExceptionOccurredEventArgs e)
{
if
(e.Exception.GetType() ==
typeof
(AggregateException))
{
var builder =
new
System.Text.StringBuilder();
var format =
"\t[{0}][{1}]\n"
;
builder.AppendLine();
foreach
(var ex
in
(e.Exception
as
AggregateException).InnerExceptions)
{
builder.AppendFormat(format,
"Type"
, ex.GetType().Name);
builder.AppendFormat(format,
"Message"
, ex.Message);
builder.AppendFormat(format,
"StackTrace"
, ex.StackTrace);
}
e.CustomData += builder.ToString();
}
}