Skip to content

Bizarre behavior when throw exceptions without try in a continuation block #14

@BYVoid

Description

@BYVoid
var test = function(callback) {
    console.log('called');
    callback(null);
}

function main() {
    try {
        test(obtain(a));
    } catch (e) {
        console.log('error by obtain', e);
    }
    throw 'a';
}

try {
    main();
} catch (e) {
    console.log('error by main', e);
}

Expected:

called
error by main a

Actual:

called
error by obtain a
error by obtain a
error by main a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions