2007-05-25 Jonathan Chambers <joncham@gmail.com>
[mcs.git] / tests / test-63.cs
blob268c607f7835affa263501cb4e61de104e1dfccb
1 //
2 // Tests rethrowing an exception
3 //
4 using System;
6 class X {
7 static int Main ()
9 bool one = false, two = false;
11 try {
12 try {
13 throw new Exception ();
14 } catch (Exception e) {
15 one = true;
16 Console.WriteLine ("Caught");
17 throw;
19 } catch {
20 two = true;
21 Console.WriteLine ("Again");
24 if (one && two){
25 Console.WriteLine ("Ok");
26 return 0;
27 } else
28 Console.WriteLine ("Failed");
29 return 1;