X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=crawler%2Fkiss%2Fsrc%2Forg%2Fwamblee%2Fcrawler%2Fkiss%2Fmain%2FReport.java;h=a3d75fea0bc0b4d72177031825f4387516bb8e05;hb=dcb1889736843d7af146fe6107d81efff9a6575b;hp=1b0406c465dc83f607b296167c40da9a5d307eec;hpb=3d3d3345af94775f62b60933bd9b2ba1583f5842;p=utils diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/main/Report.java b/crawler/kiss/src/org/wamblee/crawler/kiss/main/Report.java index 1b0406c4..a3d75fea 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/main/Report.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/main/Report.java @@ -1,4 +1,5 @@ /* + * * Copyright 2005 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -57,7 +58,7 @@ public class Report { private List _messages; /** - * Constructs the program action executor. + * Constructs the report. * */ public Report() { @@ -66,7 +67,7 @@ public class Report { RecordingResult.class); for (RecordingResult result : RecordingResult.values()) { _recordings.put(result, new TreeSet( - new Program.TimeSorter())); + new Program.TimeComparator())); } _messages = new ArrayList(); } @@ -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 programs = _interestingShows.get(aCategory); if (programs == null) { - programs = new TreeSet(new Program.TimeSorter()); + programs = new TreeSet(new Program.TimeComparator()); _interestingShows.put(aCategory, programs); } programs.add(aProgram);