Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-63.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b2ca9a64a0ffaff8d142a805c5e3363a588bd7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Tests rethrowing an exception
//
using System;

class X {
	public static int Main ()
	{
		bool one = false, two = false;

		try {
			try {
				throw new Exception ();
			} catch (Exception e) {
				one = true;
				Console.WriteLine ("Caught");
				throw;
			} 
		} catch {
			two = true;
			Console.WriteLine ("Again");
		}
		
		if (one && two){
			Console.WriteLine ("Ok");
			return 0;
		} else
			Console.WriteLine ("Failed");
		return 1;
	}
}