More details in messages by traversing exception chain.
[utils] / crawler / kiss / src / org / wamblee / crawler / kiss / main / Report.java
index ab2e3a1cb219ce737abc2b4b1c2c6025a0af3c1d..8401477365decdf980bceb4795c2af6e49e4074f 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * 
  * Copyright 2005 the original author or authors.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -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);
     }
 
     /**