Skip to content

Catch wiring semantics #89

@cefn

Description

@cefn

Decide whether catch handler should be wired with the semantic of promise.then().catch() or promise.catch()

At

if ("catch" in thenReturn) {
the catch handler for an Unpromise is wired to the catch() returned by then() rather than wiring directly to this.promise.catch()

This is harmless given the then handler chained beforehand (which is synchronous and guaranteed to execute without error) but I recall this was a deliberate design decision from the semantics of promises, but would be good to articulate the reason, or reconsider the choice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    unpromiseRelated to @watchable/unpromise

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions