Improve error message
This commit is contained in:
parent
7e2087ea56
commit
d49b17db53
|
@ -18,8 +18,8 @@ export function init() {
|
||||||
bbCtx.jsIsolate = new ivm.Isolate({ memoryLimit: 64 })
|
bbCtx.jsIsolate = new ivm.Isolate({ memoryLimit: 64 })
|
||||||
bbCtx.jsContext = bbCtx.jsIsolate.createContextSync()
|
bbCtx.jsContext = bbCtx.jsIsolate.createContextSync()
|
||||||
const helpersModule = bbCtx.jsIsolate.compileModuleSync(helpersSource)
|
const helpersModule = bbCtx.jsIsolate.compileModuleSync(helpersSource)
|
||||||
helpersModule.instantiateSync(bbCtx.jsContext, () => {
|
helpersModule.instantiateSync(bbCtx.jsContext, specifier => {
|
||||||
throw new Error("No imports allowed")
|
throw new Error(`No imports allowed. Required: ${specifier}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue