comparison test/throw1.d @ 34:4648206ca213 trunk

[svn r38] * resizing dynamic arrays support * throw is replaced with assert(0) * catch is ignored * better foreach support * various bugfixes
author lindquist
date Tue, 09 Oct 2007 02:50:00 +0200
parents
children 5071469303d4
comparison
equal deleted inserted replaced
33:bc641b23a714 34:4648206ca213
1 module throw1;
2
3 extern(C) int rand();
4
5 class C
6 {
7 }
8
9 void func()
10 {
11 if (rand() & 1)
12 throw new C;
13 }
14
15 int main()
16 {
17 try
18 {
19 func();
20 }
21 catch(Object)
22 {
23 return 1;
24 }
25 return 0;
26 }