package throwing;

@FunctionalInterface
public interface ThrowingRunnable<X extends Throwable> {
    public void run() throws X;

    default public Runnable fallbackTo(Runnable fallback) {
        ThrowingRunnable<Nothing> t = fallback::run;
        return orTry(t)::run;
    }

    default public <Y extends Throwable> ThrowingRunnable<Y> orTry(ThrowingRunnable<? extends Y> r) {
        return () -> {
            try {
                run();
            } catch (Throwable x) {
                try {
                    r.run();
                } catch (Throwable x2) {
                    x2.addSuppressed(x);
                    throw x2;
                }
            }
        };
    }
}

@@ -12,16 +12,60 @@
 owing;%0A%0A
+import throwing.function.ThrowingSupplier;%0A%0A
 @Functio
@@ -431,121 +431,90 @@
     
-return () -%3E %7B%0A            try %7B%0A                run();%0A            %7D catch (Throwable x) %7B%0A                try %7B
+ThrowingSupplier%3CVoid, X%3E s1 = () -%3E %7B%0A            run();%0A            return null;
 %0A   
@@ -510,36 +510,35 @@
 n null;%0A        
-    
+%7D;%0A
         r.run();
@@ -534,169 +534,92 @@
    r
-.run();%0A                %7D catch (Throwable x2) %7B%0A                    x2.addSuppressed(x);%0A                    throw x2;%0A                %7D%0A            %7D%0A        %7D
+eturn s1.orTry(() -%3E %7B%0A            r.run();%0A            return null;%0A        %7D)::get
 ;%0A  

Rewrite Runnable's methods to rely on Supplier's