Skip to content

Conversation

cpcallen
Copy link
Collaborator

Provide a convenient means to allow asynchronous functions to throw an exception rather than return a value.

Provide a convenient means to allow asynchronous functions to throw an exception rather than return a value.
Existing usage includes calling the callback with no arguments, intending it to return undefined.  Preserve this behaviour by treating zero and one arguments equivalently, and only throwing if it is called with two or more.

(This will break any existing usage which calls the callback with more than one argument, but that ought to be fairly uncommon!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants