You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/pivovarit/throwing-function/actions/workflows/build.yml)
[](https://starchart.cc/pivovarit/throwing-function)
9
8
10
-
## Rationale
9
+
## Overview
11
10
12
-
Standard `java.util.function`Functional Interfaces aren't checked-exception-friendly due to the absence of `throws ...` clause which results in tedious and verbose necessity of handling them by adding `try-catch` boilerplate.
11
+
Java’s standard `java.util.function`interfaces are not compatible with checked exceptions. This leads to verbose and cluttered code, requiring manual try-catch blocks for exception handling, which makes one-liners like this:
13
12
14
-
Which makes one-liners like this:
15
13
```
16
14
path -> new URI(path)
17
15
```
@@ -27,17 +25,17 @@ path -> {
27
25
}
28
26
```
29
27
30
-
By applying `com.pivovarit.function`functional interfaces, it's possible to regain clarity and readability:
28
+
This library introduces checked-exception-enabled functional interfaces, like `ThrowingFunction`, allowing cleaner, more concise code. You can now handle exceptions in functional pipelines without sacrificing readability:
0 commit comments