ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r348538 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
Date Wed, 23 Nov 2005 20:08:55 GMT
Author: antoine
Date: Wed Nov 23 12:08:47 2005
New Revision: 348538

URL: http://svn.apache.org/viewcvs?rev=348538&view=rev
Log:
EmailTask was eating SMTP error messages. Bugzilla report 37547.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=348538&r1=348537&r2=348538&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Nov 23 12:08:47 2005
@@ -161,6 +161,8 @@
 
 * > 1 ssh invocations to a given host would fail. Bugzilla report 36207.
 
+* EmailTask was eating SMTP error messages. Bugzilla report 37547.  
+
 Other changes:
 --------------
 * New task <manifestclasspath> converts a path into a property

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java?rev=348538&r1=348537&r2=348538&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java Wed Nov 23
12:08:47 2005
@@ -529,12 +529,13 @@
             log("Sent email with " + count + " attachment"
                  + (count == 1 ? "" : "s"), Project.MSG_INFO);
         } catch (BuildException e) {
-            log("Failed to send email", Project.MSG_WARN);
+            Throwable t = e.getCause() == null ? e : e.getCause();
+            log("Failed to send email: " + t.getMessage(), Project.MSG_WARN);
             if (failOnError) {
                 throw e;
             }
         } catch (Exception e) {
-          log("Failed to send email", Project.MSG_WARN);
+          log("Failed to send email: " + e.getMessage(), Project.MSG_WARN);
           if (failOnError) {
             throw new BuildException(e);
           }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message