3 ms·
This only works if I'm throwing the exceptions myself, but not if I'm using a library function (like a rowMapper for example).
by ars 8y ago
This only works if I'm throwing the exceptions myself, but not if I'm using a library function (like a rowMapper for example).
- vbezhenar 8y agoYou can write wrapper which takes function that can throw anything and returns regular java.util.function.Function. Here's example: https://github.com/rainerhahnekamp/sneakythrow/blob/master/src/main/java/com/rainerhahnekamp/sneakythrow/Sneaky.java https://github.com/rainerhahnekamp/sneakythrow/blob/master/s...