Browse Source

EmailTask was eating SMTP error messages. Bugzilla report 37547.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@348538 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 19 years ago
parent
commit
39e2e62655
2 changed files with 5 additions and 2 deletions
  1. +2
    -0
      WHATSNEW
  2. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java

+ 2
- 0
WHATSNEW View File

@@ -161,6 +161,8 @@ Fixed bugs:

* > 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


+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java View File

@@ -529,12 +529,13 @@ public class EmailTask extends Task {
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);
}


Loading…
Cancel
Save