Skip to content

Add Seq.peekThrowable(Consumer<Throwable>) #91

@lukaseder

Description

@lukaseder

There is currently no fluent way of handling exceptions in a Stream. While Stream extends AutoCloseable and provides an onClose(Runnable) hook for actions that are to be taken before the actual closing, there is no such thing for exceptions.

We should add an peekThrowable(Consumer<Throwable>) hook that allows Consumers to be added to consume all sorts of exceptions that may occur.

The actual API is not yet fully defined and may differ, e.g. by taking inspiration from the Try monad

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions