Closed kfh closed 8 years ago
Thank you very much for your suggestion. I'm sorry, I'm not sure if I understand what you're requesting. Would you mind elaborating a bit?
Sure! Right now i'm doing it like this:
Unchecked.supplier(() -> throw new CheckedException(), Unchecked.RETHROW_ALL)
but i want to do:
Sneaky.supplier(() -> throw new CheckedException())
defaulting to RETHROW_ALL.
Oh, I see. Yeah, I like that approach, including the Sneaky
class name, as that seems to have established itself to be the way to call it
Out of curiosity: do you have some codegen for Sneaky
and Unchecked
, or is it handcrafted?
Handcrafted. Speaking about some really boring work... 😮. But to be honest, writing the code generator might've taken just as long
Now we need to explicitly use the RETHROW_ALL consumer to utilize sneaky throwing, instead we should have a wrapper class using sane defaults as with THROWABLE_TO_RUNTIME_EXCEPTION.
See also https://github.com/jOOQ/jOOL/pull/234