try {
....
} catch (Exception e) {
throw new IOException("...");
}
What a dead end! The problem is that the IOException constructors that allow exception chaining were only added in Java 6. Here's a workaround that would have saved me a lot of extra effort:
try {
....
} catch (Exception e) {
IOException ioe = new IOException("...");
ioe.initCause(e);
throw ioe;
}
Java exceptions are a PITA to debug, this bug[1] "Exception messages are often uninformative" has been open since 2001...
ReplyDelete[1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4404007