Align libgc vcxproj with makefile.
[mono.git] / mono / tests / exception8.cs
1 using System;
2
3 public class TryTest {
4         public static void ThrowException() {
5                 throw new Exception();
6         }
7
8         public static int Main() {
9                 int state = 0;
10
11                 try {
12                         ThrowException();
13                         try {
14                                 Console.WriteLine("In try block");
15                         } catch (Exception e) {
16                                 state = 1;
17                                 Console.WriteLine("------------------------");
18                                 Console.WriteLine(e);
19                                 Console.WriteLine("------------------------");
20                         }
21                 } catch {
22                         state = 2;
23                 }
24
25                 if (state != 2)
26                         return 1;
27
28                 Console.WriteLine("OK");
29                 return 0;
30         }
31 }