> Dawid's Rethrower class is sneaky :) Doesn't require wrapping as > RuntimeException ever...
It's not mine, it's from here as far as I remember -- http://www.javapuzzlers.com/. I did a similar thing once for 1.4 by editing .class file so that a method wasn't declaring a checked exception, but it's a different story. > But either approach is better than always wrapping in RuntimeException. I think for tests it's better to rethrow the original unless you need and want to preserve the middle catchpoint. For production code I agree wrapping is more intuitive because otherwise people don't see where exactly the exception came from and this is confusing like hell (because they see the impossible at Java language syntax level). Dawid --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org