Archive for December, 2009

Exceptions in BackgroundWorker

By admin - Last updated: Thursday, December 17, 2009

To save 15 minutes of confusion.
If an exception is thrown in a BackgroundWorker’s DoWork handler, the backgroundworker will catch it and place the exception in RunWorkerCompleted’s e.Error.
If it seems like the Exception’s still being thrown with no apparent way to catch it, it’s becauseĀ if e.Error is not null. When that’s the case, e.Result will throw [...]