From 999cdb81eab81ea84207e1ad058e159520b37838 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 26 Aug 2023 13:48:50 +0700 Subject: [PATCH] handle vm uncaughts --- vm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vm.js b/vm.js index 26e8083..31fdaf5 100644 --- a/vm.js +++ b/vm.js @@ -74,3 +74,7 @@ parentPort.on('message', (msg) => { break } }) + +process.on('uncaughtException', (e) => { + console.log(`Caught an uncaught exception in the worker!\n${e.stack}`) +})