class ErrorTest { public static void rethrow(Thrower thrower) { try { thrower.doThrow(); } catch (Throwable e) { throw e; } } interface Thrower { void doThrow() throws E; } }