diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-15 16:17:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-25 13:47:25 +0200 |
commit | 83636d2c09802aeeb1b30078022d228d04da21eb (patch) | |
tree | 8a0c619e16c1f6b5388939d5da2956f7ef758c19 /xmlsecurity/test_docs | |
parent | cf49392511e98851174b353782df9eb6bac46f77 (diff) |
java: when rethrowing exceptions, store the original cause
so that we get a nice complete stacktrace when it hits the final
handler
Change-Id: Iec4fcc15a2a25c55f591b5e069dce3d010197a90
Diffstat (limited to 'xmlsecurity/test_docs')
-rw-r--r-- | xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java b/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java index 6629a327a0ca..d9c2c07b292f 100644 --- a/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java +++ b/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java @@ -130,10 +130,10 @@ class MyHandler implements HttpHandler { System.out.println("requested: " + sRequestPath); File fileRequest = new File(new File(".").getCanonicalPath(), sRequestPath); if (!fileRequest.exists()) { - throw new Exception("The file " + fileRequest.toString() + " does not exist!\n"); + throw new IOException("The file " + fileRequest + " does not exist!"); } else if (fileRequest.isDirectory()) { - throw new Exception(fileRequest.toString() + " is a directory!\n"); + throw new IOException(fileRequest + " is a directory!\n"); } |