提交 8c2f2f85 编写于 作者: K kohsuke

making the message more informative.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20973 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6e58a21d
......@@ -59,7 +59,11 @@ public class AtomicFileWriter extends Writer {
* File encoding to write. If null, platform default encoding is chosen.
*/
public AtomicFileWriter(File f, String encoding) throws IOException {
tmpFile = File.createTempFile("atomic",null,f.getParentFile());
try {
tmpFile = File.createTempFile("atomic",null,f.getParentFile());
} catch (IOException e) {
throw new IOException2("Failed to create a temporary file in "+f.getParentFile(),e);
}
destFile = f;
if (encoding==null)
encoding = Charset.defaultCharset().name();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册