Questions tagged [unobserved-exception]

In the Task Parallel Library (TPL), an unobserved exception is one which is thrown by the finalizer thread when a Task exception occurs but is not actively observed.

In the Task Parallel Library (TPL), an unobserved exception is one which is thrown by the finalizer thread when a Task exception occurs but is not actively observed.

References

18 questions
1
vote
1 answer

Why is the UnobservedTaskException event handler not triggered for a Task which throws an exception?

I have the below test program which sets up the UnobservedTaskException however the OnTaskException method is never executed. Any ideas? NOTE: If I remove the "for loop" then everything works as expected. static void Main() { …
MaYaN
  • 6,683
  • 12
  • 57
  • 109
0
votes
1 answer

How do I diagnose this unobserved exception?

I have a C# webapi project that is communicating as a signalr client with another application. Periodically it throws this exception which causes it to crash. I can reproduce the exception by running some load tests on it, but despite searching high…
dylanT
  • 1,080
  • 1
  • 13
  • 26
0
votes
6 answers

How to cause AggregateException with TPL?

I'm trying to recreate the conditions that will cause this exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was…
Sylvain
  • 19,099
  • 23
  • 96
  • 145
1
2