1
0
Fork 0
mirror of synced 2024-09-08 13:41:09 +12:00

Improve error message

This commit is contained in:
Adria Navarro 2024-01-15 13:06:07 +01:00
parent 7e2087ea56
commit d49b17db53

View file

@ -18,8 +18,8 @@ export function init() {
bbCtx.jsIsolate = new ivm.Isolate({ memoryLimit: 64 })
bbCtx.jsContext = bbCtx.jsIsolate.createContextSync()
const helpersModule = bbCtx.jsIsolate.compileModuleSync(helpersSource)
helpersModule.instantiateSync(bbCtx.jsContext, () => {
throw new Error("No imports allowed")
helpersModule.instantiateSync(bbCtx.jsContext, specifier => {
throw new Error(`No imports allowed. Required: ${specifier}`)
})
}