Samuel Jack
Samuel Jack

Reputation: 33270

Event for unhandled exceptions in Silverlight background threads?

Is there a usable equivalent of AppDomain.UnhandledException for Silverlight? I say usable, because, although the method exists in Silverlight, MSDN has it marked as [SecurityCritical].

What I'd like is to receive notification of Exceptions happening on background or ThreadPool threads so that I can log them. Application.UnhandledException was another candidate, but it looks like that only recieves exceptions from the UI thread.

Upvotes: 4

Views: 1043

Answers (1)

Curt Nichols
Curt Nichols

Reputation: 2767

Are you using Silverlight 3? I just put together a simple SL3 application that showed that Application.UnhandledException was notified on unhandled exceptions from the UI thread, a thread pool thread, a worker thread and a background worker thread.

You may have convinced yourself prematurely. :)

Upvotes: 6

Related Questions