Regarding exception happen in module success callback.

26 views
Skip to first unread message

Subash Durairaj

unread,
Jun 2, 2023, 4:16:48 AM6/2/23
to v8-users
Hi Team, consider i have following script.

function run() {
console.log("before logger");
let promise = import("./logger.js");
promise.then(
    function (module) {
        const x = 10;
        x++;
    },
    function (err) {
        console.log(JSON.stringify(err));
    }
);
console.log("after logger");
}

in this case promise success function, have error which changing the const value.
but Local<Function> call of that run function, return true in c++. also there is no error caught in v8::TryCatch in c++. 

how to catch the error's after resolving the module.

Reply all
Reply to author
Forward
0 new messages