Skip to content

AV.Promise failed to catch error in resolveFun #98

@liuyanghejerry

Description

@liuyanghejerry

Given code like this:

       new AV.Promise(function(resolve, reject) {
        return resolve(123);
    })
    .then(function() {
        throw {code: 1};
    })
    .then(function(){}, function(error) {
        console.log('catch them all!');
    })

Expected to print catch them all! but got uncaught error.

When inspected the source, found _isPromisesAPlusCompliant = false in promise.js, which seems to break the behavior expected earlier.

Wondering why?

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