(no commit message)
[utils] / crawler / kiss / src / org / wamblee / crawler / kiss / main / Report.java
index ab2e3a1cb219ce737abc2b4b1c2c6025a0af3c1d..a3d75fea0bc0b4d72177031825f4387516bb8e05 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * 
  * Copyright 2005 the original author or authors.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -66,7 +67,7 @@ public class Report {
                 RecordingResult.class);
         for (RecordingResult result : RecordingResult.values()) {
             _recordings.put(result, new TreeSet<Program>(
-                    new Program.TimeSorter()));
+                    new Program.TimeComparator()));
         }
         _messages = new ArrayList<String>();
     }
@@ -89,7 +90,11 @@ public class Report {
      * @param aException Exception that caused the problem.
      */
     public void addMessage(String aMessage, Exception aException) {
-        _messages.add(aMessage + ": " + aException.getMessage());
+        String msg = aMessage; 
+        for (Throwable e = aException; e != null; e = e.getCause()) {
+            msg += ": " + e.getMessage(); 
+        }
+        addMessage(msg);
     }
 
     /**
@@ -104,7 +109,7 @@ public class Report {
         LOG.info("category = '" + aCategory + "', program: " + aProgram);
         Set<Program> programs = _interestingShows.get(aCategory);
         if (programs == null) {
-            programs = new TreeSet<Program>(new Program.TimeSorter());
+            programs = new TreeSet<Program>(new Program.TimeComparator());
             _interestingShows.put(aCategory, programs);
         }
         programs.add(aProgram);