From 9321ea62bf774db037a102d594dcfe174c249488 Mon Sep 17 00:00:00 2001 From: Gintas Grigelionis Date: Sun, 18 Nov 2018 20:14:56 +0100 Subject: [PATCH] Revert: any RuntimeException must be wrapped --- src/main/org/apache/tools/ant/taskdefs/EchoXML.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/EchoXML.java b/src/main/org/apache/tools/ant/taskdefs/EchoXML.java index 2f2994867..571386d39 100644 --- a/src/main/org/apache/tools/ant/taskdefs/EchoXML.java +++ b/src/main/org/apache/tools/ant/taskdefs/EchoXML.java @@ -86,7 +86,9 @@ public class EchoXML extends XMLFragment { try (OutputStream os = (file == null) ? new LogOutputStream(this, Project.MSG_INFO) : FileUtils.newOutputStream(file.toPath(), append)) { writer.write((Element) n, os); - } catch (IOException e) { + } catch (BuildException be) { + throw be; + } catch (Exception e) { throw new BuildException(e); } }