mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
Merge pull request #244690 from wszgrcy/precise-crane
fix: extension uncaughtException listen Maximum call stack size exceeded
This commit is contained in:
1 file changed
+3
-2
@@ -103,9 +103,10 @@ function patchProcess(allowExit: boolean) {
|
||||
|
||||
process.on = <any>function (event: string, listener: (...args: any[]) => void) {
|
||||
if (event === 'uncaughtException') {
|
||||
listener = function () {
|
||||
const actualListener = listener;
|
||||
listener = function (...args: any[]) {
|
||||
try {
|
||||
return listener.call(undefined, arguments);
|
||||
return actualListener.apply(undefined, args);
|
||||
} catch {
|
||||
// DO NOT HANDLE NOR PRINT the error here because this can and will lead to
|
||||
// more errors which will cause error handling to be reentrant and eventually
|
||||
|
||||
Reference in new issue
Block a user