View | Details | Raw Unified | Return to bug 48644
Collapse All | Expand All

(-)java/org/apache/catalina/ant/AbstractCatalinaTask.java (-5 / +4 lines)
Lines 20-25 Link Here
20
20
21
21
22
import java.io.BufferedOutputStream;
22
import java.io.BufferedOutputStream;
23
import java.io.IOException;
23
import java.io.InputStream;
24
import java.io.InputStream;
24
import java.io.InputStreamReader;
25
import java.io.InputStreamReader;
25
import java.net.HttpURLConnection;
26
import java.net.HttpURLConnection;
Lines 262-268 Link Here
262
                // or error line will be logged twice
263
                // or error line will be logged twice
263
                throw new BuildException(error);
264
                throw new BuildException(error);
264
            }
265
            }
265
        } catch (Throwable t) {
266
        } catch (Exception t) {
266
            if (isFailOnError()) {
267
            if (isFailOnError()) {
267
                throw new BuildException(t);
268
                throw new BuildException(t);
268
            } else {
269
            } else {
Lines 273-288 Link Here
273
            if (reader != null) {
274
            if (reader != null) {
274
                try {
275
                try {
275
                    reader.close();
276
                    reader.close();
276
                } catch (Throwable u) {
277
                } catch (IOException ignored) {
277
                    ExceptionUtils.handleThrowable(u);
278
                }
278
                }
279
                reader = null;
279
                reader = null;
280
            }
280
            }
281
            if (istream != null) {
281
            if (istream != null) {
282
                try {
282
                try {
283
                    istream.close();
283
                    istream.close();
284
                } catch (Throwable u) {
284
                } catch (IOException ignored) {
285
                    ExceptionUtils.handleThrowable(u);
286
                }
285
                }
287
                istream = null;
286
                istream = null;
288
            }
287
            }
(-)java/org/apache/catalina/ant/ValidatorTask.java (-1 / +1 lines)
Lines 100-106 Link Here
100
            is.setByteStream(stream);
100
            is.setByteStream(stream);
101
            digester.parse(is);
101
            digester.parse(is);
102
            handleOutput("web.xml validated");
102
            handleOutput("web.xml validated");
103
        } catch (Throwable t) {
103
        } catch (Exception t) {
104
            if (isFailOnError()) {
104
            if (isFailOnError()) {
105
                throw new BuildException("Validation failure", t);
105
                throw new BuildException("Validation failure", t);
106
            } else {
106
            } else {
(-)java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java (-1 / +1 lines)
Lines 196-202 Link Here
196
                    try {
196
                    try {
197
                        value = jmxServerConnection
197
                        value = jmxServerConnection
198
                                .getAttribute(oname, attName);
198
                                .getAttribute(oname, attName);
199
                    } catch (Throwable t) {
199
                    } catch (Exception t) {
200
                        if (isEcho())
200
                        if (isEcho())
201
                            handleErrorOutput("Error getting attribute "
201
                            handleErrorOutput("Error getting attribute "
202
                                    + oname + " " + pname + attName + " "
202
                                    + oname + " " + pname + attName + " "
(-)java/org/apache/catalina/ant/jmx/JMXAccessorTask.java (-1 / +1 lines)
Lines 351-357 Link Here
351
                    // or error line will be logged twice
351
                    // or error line will be logged twice
352
                    throw new BuildException(error);
352
                    throw new BuildException(error);
353
                }
353
                }
354
            } catch (Throwable t) {
354
            } catch (Exception t) {
355
                if (isFailOnError()) {
355
                if (isFailOnError()) {
356
                    throw new BuildException(t);
356
                    throw new BuildException(t);
357
                } else {
357
                } else {

Return to bug 48644