Skip to content

Commit 036bb0d

Browse files
committed
clarify the behavior of tapFailure to only ignore non-fatal exceptions in scala docs
1 parent 4ac94b6 commit 036bb0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/com/avsystem/commons/SharedExtensions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ object SharedExtensionsUtils extends SharedExtensions {
466466
* Apply side-effect only if Try is a failure. The provided `action` function will be called with the
467467
* throwable from the failure case, allowing you to perform operations like logging or error handling.
468468
*
469-
* Any exceptions thrown by the `action` function are caught and ignored, ensuring that this method
469+
* Non-fatal exceptions thrown by the `action` function are caught and ignored, ensuring that this method
470470
* always returns the original Try instance regardless of what happens in the action.
471471
*
472472
* Don't use .failed projection, because it unnecessarily creates Exception in case of Success,
@@ -477,7 +477,7 @@ object SharedExtensionsUtils extends SharedExtensions {
477477
case Failure(throwable) =>
478478
try action(throwable)
479479
catch {
480-
case NonFatal(_) => // ignore any exceptions thrown by the action
480+
case NonFatal(_) => // ignore non-fatal exceptions thrown by the action
481481
}
482482
tr
483483

0 commit comments

Comments
 (0)