microsoft / vscode-loader

An universal Asynchronous Module Definition (AMD) Loader developed primarily to load VSCode's sources.
Other
170 stars 55 forks source link

`ModuleManager._onLoadError` swallows erros #35

Closed bpasero closed 3 years ago

bpasero commented 3 years ago

When you look at this line:

https://github.com/microsoft/vscode-loader/blob/195de94015479ad11acf729faff9fffd402daee6/src/core/moduleManager.ts#L639

The error callback is essentially disabled via function () { }.

From my usage of AMD loader in node.js enabled web worker, I was never able to see errors from the require call unless I would debug, even if I pass a error handle to the require call as argument. I traced it down to that line which seems to swallow any errors that are raised instead of sending them back to the error handler.

alexdima commented 3 years ago

Very nice find!