blob: 268c607f7835affa263501cb4e61de104e1dfccb (
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 {
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;
}
}
|