Open Gaibhne opened 4 years ago
We talked about this a few days ago; basically, it allows you to properly catch an Exception thrown from code you call in a lambda, like so:
Exception
public void testCheckedException() throws IOException { RetryPolicy<Object> retryPolicy = new RetryPolicy<>(); Failsafe.with(retryPolicy).getWithException(() -> { throw new IOException(); }); }
or
RetryPolicy<Object> retryPolicy = new RetryPolicy<>(); try { Failsafe.with(retryPolicy).getWithException(() -> { throw new IOException(); }); } catch (IOException e) { e.printStackTrace(); // this is horrible practice }
Obviously the code is not intended to be accepted like this, it's just a POC.
Coverage decreased (-1.8%) to 90.593% when pulling 1dc0c8d95b977329c07cc3de884d01f57387ec6b on Gaibhne:master into 7f411c65dfb29e1b4679a269796a5d1632c8acfc on jhalterman:master.
We talked about this a few days ago; basically, it allows you to properly catch an
Exception
thrown from code you call in a lambda, like so:or
Obviously the code is not intended to be accepted like this, it's just a POC.