Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 16
    So you have a set of interfaces (Function, Consumer, Supplier, ...) and a set of policies for handling errors (Throwing, System.out.println, ...). I think there's a way to make it easy to use any policy with any kind of function, without having to copy paste "ThrowingConsumer, ThrowingFunction, etc.". Commented May 14, 2015 at 19:55
  • 2
    some time later... I decided to use unchecked exceptions and not use any additional functional interfaces or new libraries -> the easy road, less typing, faster delivery, isn't it. Commented Aug 2, 2017 at 9:32
  • 1
    Here is an improved version using sneaky throwing idiom. No need to unwrap RuntimeException into CheckException. Commented Oct 27, 2017 at 2:33
  • I prefer this approach instead of using library or other thing. Thank you anyway. Commented Jun 13, 2022 at 9:09