Skip to content

Commit 5ef8581

Browse files
committed
Update ThrowingFunction.java
1 parent be46c94 commit 5ef8581

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/comroid/api/ThrowingFunction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ static <I, O, T extends Throwable> Function<I, O> rethrowing(
1111
try {
1212
return function.apply(in);
1313
} catch (Throwable error) {
14-
throw remapper.apply(error);
14+
if (remapper != null)
15+
throw remapper.apply(error);
16+
return null;
1517
}
1618
};
1719
}

0 commit comments

Comments
 (0)