Skip to content

Instantly share code, notes, and snippets.

@kiwidev
kiwidev / ExceptionWrappingSynchronizationContext.cs
Created October 26, 2012 10:53
SynchronizationContext that allows for catching and dealing with unhandled exceptions. Very useful in WinRT.
using System;
using System.Threading;
namespace TestExceptions
{
/// <summary>
/// Wrapper around a standard synchronization context, that catches any unhandled exceptions.
/// Acts as a facade passing calls to the original SynchronizationContext
/// </summary>
/// <example>