提交 be5438b3 编写于 作者: B Brian Atkinson

Log out exceptions that happen in copy threads.

This could be useful in trying to track down when things break in special
ways.
上级 a25c0b0d
......@@ -3,6 +3,8 @@ package hudson.remoting.forward;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Copies a stream and close them at EOF.
......@@ -10,6 +12,7 @@ import java.io.OutputStream;
* @author Kohsuke Kawaguchi
*/
final class CopyThread extends Thread {
private static final Logger LOGGER = Logger.getLogger(CopyThread.class.getName());
private final InputStream in;
private final OutputStream out;
......@@ -31,7 +34,7 @@ final class CopyThread extends Thread {
out.close();
}
} catch (IOException e) {
// TODO: what to do?
LOGGER.log(Level.WARNING, "Exception while copying in thread: " + getName(), e);
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册