Mercurial > projects > dstress
annotate run/try_04.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.try_04; | |
0 | 6 |
7 class MyException : Exception{ | |
8 this(char[] msg){ | |
9 super(msg); | |
10 } | |
11 int x; | |
12 } | |
13 int main(){ | |
14 int check=0; | |
15 assert(check==0); | |
16 try{ | |
17 MyException e=new MyException(""); | |
18 e.x=2; | |
19 throw e; | |
20 }catch(MyException me){ | |
21 assert(me.x==2); | |
22 check+=5; | |
23 }catch(Exception){ | |
24 check+=3; | |
25 }finally{ | |
26 check++; | |
27 } | |
28 assert(check==6); | |
29 return 0; | |
30 } |