Commit f8fdcc13 authored by Andy Wilkinson's avatar Andy Wilkinson

Include value of java.io.tmpdir in message when createTempFile fails

If java.io.tmpdir is configured to a directory that does not exist,
calls to File.createTempFile will fail with an IOException with the
message "The system cannot find the path specified". Unfortunately,
the path the was specified is not included in the message.

Rather than trying to automatically create the directory in what may
be a misconfigured location, we now include the value of
java.io.tmpdir in our own exception's message. Hopefully this will
help users to figure out what they've done wrong.

Closes gh-3307
parent 982b81c6
......@@ -388,7 +388,8 @@ public class TomcatEmbeddedServletContainerFactory extends
}
catch (IOException ex) {
throw new EmbeddedServletContainerException(
"Unable to create Tomcat tempdir", ex);
"Unable to create Tomcat tempdir. java.io.tmpdir is set to "
+ System.getProperty("java.io.tmpdir"), ex);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment