Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow users of "invoke a callback function" to report the exception
This makes it more concise for users to, as is frequently desired for undefined-returning callbacks especially, immediately catch and report the exception rather than needing to handle it themselves. This isn't appropriate for other types of callback functions, where a result may be expected or the exception needs to be rethrown. Callers need to explicitly decide which behavior they want, unless the callback returns a promise type, in which case exceptions are turned into rejected promises implicitly. Fixes #1423, except for updating the call sites.
- Loading branch information