2010-05-11 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / tests / exception8.cs
blobcbd81380598dc3161786b1638d1a28b1d5b2b0f5
1 using System;
3 public class TryTest {
4 public static void ThrowException() {
5 throw new Exception();
8 public static int Main() {
9 int state = 0;
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("------------------------");
21 } catch {
22 state = 2;
25 if (state != 2)
26 return 1;
28 Console.WriteLine("OK");
29 return 0;