Update Haiku support (#15674)
[mono-project.git] / mono / tests / unhandled-exception-8.cs
blob7b4de0e97bfd93b6c1639faade36627de71fb9e7
2 using System;
3 using System.Threading;
5 class CustomException : Exception
9 class Driver
11 /* expected exit code: 255 */
12 public static void Main ()
14 if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null)
15 AppDomain.CurrentDomain.UnhandledException += (s, e) => {};
17 ManualResetEvent mre = new ManualResetEvent(false);
19 ThreadPool.RegisterWaitForSingleObject (mre, (state, timedOut) => { throw new CustomException (); }, null, -1, true);
20 mre.Set();
22 Thread.Sleep (5000);