sneakyThrow()

Java Puzzlersから。


public class Main {

public static void main(String[] args) {
SQLException e = new SQLException();
sneakyThrow(e);
}

public static void sneakyThrow(Exception e) {
Thread.currentThread().stop(e);
}

}