public class RelanzadorExcepciones { public static RuntimeException lanzar( Exception ex){ RelanzadorExcepciones.lanzarComoUnchecked(ex); throw new AssertionError("Esta línea nunca se ejecutará pero Java no lo sabe"); } private static void lanzarComoUnchecked(Exception toThrow) throws T{ throw (T) toThrow; } }