Package libcore.util

Class SneakyThrow


  • public class SneakyThrow
    extends Object
    Provides a hacky method that always throws t even if t is a checked exception. and is not declared to be thrown. See http://www.mail-archive.com/javaposse@googlegroups.com/msg05984.html
    • Constructor Detail

      • SneakyThrow

        public SneakyThrow()
    • Method Detail

      • sneakyThrow

        public static void sneakyThrow​(Throwable t)
        A hacky method that always throws t even if t is a checked exception, and is not declared to be thrown.