2 using System
.Threading
;
7 AppDomain
.CurrentDomain
.UnhandledException
+= OnUnhandledException
;
8 WaitCallback wcb
= new WaitCallback ((a
) => {
9 throw new Exception ("From the threadpoool");
11 wcb
.BeginInvoke (wcb
, OnCBFinished
, null);
13 // Should not finish, OnUnhandledException exit path is expected to be executed
19 static void OnCBFinished (object arg
)
21 throw new Exception ("From OnCBFinished");
24 static void OnUnhandledException (object sender
, UnhandledExceptionEventArgs e
)