Closed RG9 closed 2 years ago
I think the only improvement would be for Failsafe to add an option to support sneaky throws, ex:
Failsafe.with(policy).withSneakyThrows().run(this::doSomething);
I've always wondered if this would be requested, but surprisingly it hasn't so far. Is unwrapping checked exceptions just inconvenient for you?
Thanks for answer.
I think I just tried to implement an overly generic solution.
After narrowing down the scope, unwrapping is also fine :+1:
Besides, from my understanding, checked exceptions were designed to support recover from error, but actually this is where Failsafe
takes the baton.
Good to hear. I'll close this issue for now then.
test:
my current workaround:
Is there any better way to deal with it?