puzzlecracker wrote:
> public static void sneakyThrow(Throwable t){
> Thread.currentThread().stop(t);
> }
>
> ----It appears that you can throw exception from any point in your
> code.
> what does it mean?
>
> How and why it bypasses all the exceptions? bypassed where?
Exceptions aren't bypassed, but exception checking is.
For a method (in source code) to be able to throw an exception that does
not extend Error or RuntimeException, a throws clause needs to be
present. The checking is done at compile-time, not at runtime. There are
a number of ways to throw a checked exception from methods that do not
declare that exception, as detailed in the book.
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/