1 

2 
 Copyright (c) 19932006 University of Southern California and contributors. 
3 
 All rights reserved. 
4 
 Your use of this work is governed under the terms of the GNU General 
5 
 Public License version 2. 
6 

7 
class TEST 
8 
inherit 
9 
EXCEPTIONS 
10 
creation 
11 
make 
12 
feature 
13 
make is 
14 
do 
15 
try; 
16 
end; 
17 

18 
try is 
19 
do 
20 
io.putstring ("Starting try%N"); 
21 
check 
22 
show ("Evaluating try check assertion%N") 
23 
weasel 
24 
end 
25 
end 
26 

27 
weasel: BOOLEAN is 
28 
local 
29 
tried: BOOLEAN; 
30 
do 
31 
io.putstring ("Starting weasel%N"); 
32 
if not tried then 
33 
check 
34 
show ("Evaluating weasel check assertion%N") 
35 
wimp 
36 
end 
37 
io.putstring ("Raising exception%N"); 
38 
raise ("weasels"); 
39 
end 
40 
print (wimp); io.new_line; 
41 
Result := True; 
42 
rescue 
43 
io.putstring ("In weasel rescue clause%N"); 
44 
tried := True; 
45 
retry; 
46 
end; 
47 

48 
wimp: BOOLEAN is 
49 
do 
50 
io.putstring ("Starting wimp%N"); 
51 
check 
52 
show ("Evaluating wimp check assertion%N") 
53 
end 
54 
Result := True; 
55 
end; 
56 

57 
show (s: STRING): BOOLEAN is 
58 
do 
59 
io.putstring (s); 
60 
Result := True; 
61 
end 
62 

63 
end 