Skip to content

Stopping progress propagation #2

@briancavalier

Description

@briancavalier

See #1

Progress handlers should be allowed to explicitly stop progress propagation. The trend in #1 seems to be toward allowing handlers to throw a duck-typed "stop propagation" error.

What should this error look like? One option is to follow builtin Error convention and have it be an Error whose .name == "<some specific name>", since we can't rely on instanceof across implementations.

Two related questions:

  1. Would it be better to return such an error rather than throw it?
  2. Would it be ok to allow returning such an error in addition to throwing it?

My instinct is that we should only support throwing the stop propagation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions