2 using System.Diagnostics;
3 using System.Threading;
4 using System.Threading.Tasks;
6 class CustomException : Exception
12 /* Expected exit code: 1 */
13 static void Main (string[] args)
15 ManualResetEvent mre = new ManualResetEvent (false);
17 var t = new Thread (new ThreadStart (() => { try { throw new CustomException (); } finally { mre.Set (); } }));
20 if (!mre.WaitOne (5000))