2 using System.Threading.Tasks;
8 public static async Task TestRethrow (Exception e)
12 } catch (ApplicationException) {
13 Console.WriteLine ("x1a");
16 Console.WriteLine ("x2a");
22 Console.WriteLine ("ga");
27 public static int Main ()
29 var ex = new ApplicationException ();
31 TestRethrow (ex).Wait ();
32 } catch (AggregateException e) {
33 if (e.InnerException != ex)
40 var ex2 = new NotSupportedException ();
42 TestRethrow (ex2).Wait ();
43 } catch (AggregateException e) {
44 if (e.InnerException != ex2)
51 Console.WriteLine ("ok");