1 
note 
2 
description: "Mock class for a result logger." 
3 
author: "Florian Besser, Roman Schmocker" 
4 
date: "$Date$" 
5 
revision: "$Revision$" 
6 

7 
class 
8 
LOGGER 
9 

10 
feature 
11 

12 
solution: INTEGER 
13 
 The last solution found in one of the searchers. 
14 

15 
log (a_first_searcher, a_second_searcher: separate SEARCHER) 
16 
 Try to log the solution of the first searcher, and if that fails, 
17 
 log from the second searcher. 
18 
local 
19 
retried: BOOLEAN 
20 
do 
21 
if not retried then 
22 
if a_first_searcher.has_solution then 
23 
print ("In {LOGGER}.log: Using first solution.%N") 
24 
solution := a_first_searcher.solution 
25 
else 
26 
print ("In {LOGGER}.log: Using second solution.%N") 
27 
solution := a_second_searcher.solution 
28 
end 
29 
end 
30 
rescue 
31 
print ("In rescue of {LOGGER}.log.%N") 
32 
retried := True 
33 
retry 
34 
end 
35 

36 
end 