public < T > T runUnchecked ( Retryable < T > operation ) throws RuntimeException { try { return run ( operation ) ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new RuntimeException ( "Retryable " + operation + " failed: " + e . getMessage ( ) , e ) ; } }
Run the operation only throwing an unchecked exception on failure