@@ -0,0 +1,997 @@
+package net.binggl.login.core.util;%0A%0A/**%0A * @see https://gist.github.com/jfager/9317201%0A * %0A * %3Cpre%3E%0A * %7B@code%0A * import static net.binggl.login.core.util.ExceptionHelper.wrap;%0A * %0A * String foo = wrap(() -%3E %7B%0A *     if(new Random().nextBoolean()) %7B%0A *         throw new Exception(%22Look ma, no try/catch!%22);%0A *     %7D else %7B%0A *         return %22Cool%22;%0A *     %7D%0A * %7D);%0A * %7D%0A * %3C/pre%3E %0A */%0Apublic class ExceptionHelper %7B%0A    %0A    public interface Block %7B%0A        void go() throws Exception;%0A    %7D%0A    %0A    public interface NoArgFn%3CT%3E %7B%0A        T go() throws Exception;%0A    %7D%0A    %0A    //And because these overload it only looks like I'm importing one name.%0A    public static void wrap(Block t) %7B%0A        try %7B%0A            t.go();%0A        %7D catch(Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A    %0A    public static %3CT%3E T wrap(NoArgFn%3CT%3E f) %7B%0A        try %7B%0A            return f.go();%0A        %7D catch(Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%7D

Add a nice helper to wrap checked Exceptions to unchecked ones