Given that I basically want to eliminate checked exception usage and transform them to runtime exceptions, I would normally be doing something like this:
try { file.read(); } catch (IOException e){ throw new RuntimeException(e); } There are several disadvantages to doing this, but the one that irritates me the most is that my runtime exception would contain a nested stacktrace. Basically I would like to re-throw the "IOException" as a RuntimeException (or "IORuntimeException") with the original message and stacktrace, so I can avoid the useless nested stacktrace. The "fact" that I have re-thrown the exception somewhere in the middle seems like just useless noise to me.
Is this possible ? Is there any library that does this ?