Skip to content

Commit

Permalink
use 'foreach' for side-effects
Browse files Browse the repository at this point in the history
  • Loading branch information
yanns committed Oct 26, 2021
1 parent 443e7a5 commit f6aab7d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ class Resolver[Ctx](
newUc.map(_.ctxFn(v)).getOrElse(userCtx)

def resolveError(newUc: Option[MappedCtxUpdate[Ctx, Any, Any]], e: Throwable) = {
try newUc.map(_.onError(e))
try newUc.foreach(_.onError(e))
catch {
case NonFatal(ee) => ee.printStackTrace()
}
Expand Down

0 comments on commit f6aab7d

Please sign in to comment.