Skip to content

Completable swallows OnErrorNotImplementedException #3860

Closed
@kotucz

Description

@kotucz

In the following case, the IllegalStateException should cause OnErrorNotImplementedException, because subscribe() has no onError handler specified.

        Completable.fromCallable(() -> {
            throw new IllegalStateException("FOO");
        })
            .toSingleDefault(1)
            .subscribe();

In the related issue #3726 and PR #3733, similar problem was solved, that the exception was propagated to the thread exception handler. For example it works correctly in the following snippet and the OnErrorNotImplementedException delivered.

        Completable.fromCallable(() -> {
            throw new IllegalStateException("FOO");
        })
            .subscribe();

Maybe more of the usages of the toNpe() shall be replaced with deliverUncaughtException()?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions