Skip to content

Commit

Permalink
Note on catching exception from resolving element
Browse files Browse the repository at this point in the history
Behavior introduced in b4e2b41
  • Loading branch information
runeflobakk committed Sep 26, 2024
1 parent 96de111 commit 4afb470
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/no/digipost/DiggBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ public static Stream<Exception> close(AutoCloseable ... closeables) {

/**
* Create a stream which will yield the exceptions (if any) from invoking an {@link ThrowingConsumer action} on
* several {@code instances}. Consuming the stream will ensure that <strong>all</strong> instances will have
* the action invoked on them, and any exceptions happening will be available through the returned stream.
* several {@code instances}. Consuming the returned stream will ensure that <strong>all</strong> instances will have
* the action attempted on them, and any exceptions happening will be available through the returned stream.
*
* @param action the action to execute for each provided instance
* @param instances the instances to act on with the provided {@code action}.
Expand All @@ -239,8 +239,12 @@ public static <T> Stream<Exception> forceOnAll(ThrowingConsumer<? super T, ? ext

/**
* Create a stream which will yield the exceptions (if any) from invoking an {@link ThrowingConsumer action} on
* several {@code instances}. Consuming the stream will ensure that <strong>all</strong> instances will have
* the action invoked on them, and any exceptions happening will be available through the returned stream.
* several {@code instances}. This also includes exceptions thrown from <em>traversing</em> the given {@link Stream}
* of instances, i.e. should resolving an element from the {@code Stream} cause an exception, it will be caught and
* included in the returned {@code Stream}.
* <p>
* Consuming the returned stream will ensure that <strong>all</strong> traversed instances will have
* the action attempted on them, and any exceptions happening will be available through the returned stream.
*
* @param action the action to execute for each provided instance
* @param instances the instances to act on with the provided {@code action}.
Expand Down

0 comments on commit 4afb470

Please sign in to comment.