[Mono-list] Null task exception when doing ContinueWith
gbarberi at aotaonline.com
Fri May 2 15:03:14 UTC 2014
I'm gonna try to isolate the issue but I haven't been able to reproduce it
in dev and only seen it in prod. Problem is without the stacktrace it's
hard to know where the problem is coming from. I'm wondering if anyone has
seen something similar or knows any case where the exception may be null.
If not, I'm gonna keep trying to reproduce it.
On Fri, May 2, 2014 at 9:24 AM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
> Can you provide with a test case that shows this behavior? If so, please
> file a bug report.
> On Fri, May 2, 2014 at 7:17 AM, Giuliano Barberi <gbarberi at aotaonline.com>wrote:
>> Hey guys I'm seeing something strange. It could totally be user error but
>> I can't seem to figure it out.
>> I am doing this on some tasks that I never await in order to get the
>> public static Task CatchUnhandledException(this Task task)
>> return task.ContinueWith(continuation =>
>> TaskContinuationOptions.ExecuteSynchronously |
>> and the Engine.UnhandledExceptionHandler just logs the exception.
>> What's strange is that the exception is null and also doing
>> an Environment.StackTrace in the handler also yields nothing. I do have
>> --debug with the mdb files so I would suspect to get the full stacktrace. I
>> never saw this issue when I was running on .NET runtime but I also have
>> added more async code since so I'm not sure if it's something with Mono or
>> my app. I just can't find anything online and the documentation for Tasks
>> says that if it's faulted state there will be an exception.
>> Giuliano Barberi
>> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list