custom-module: add filename to error traces, add support for node/electron --inspect switch
This commit is contained in:
parent
dabd01fca4
commit
55ff84b7cb
2 changed files with 5 additions and 2 deletions
|
|
@ -66,7 +66,9 @@ class OscServer {
|
|||
})
|
||||
|
||||
try {
|
||||
mod = vm.runInContext(file, context)
|
||||
mod = vm.runInContext(file, context, {
|
||||
filename: customModule[0]
|
||||
})
|
||||
if (context.module.exports) mod = context.module.exports
|
||||
} catch(err) {
|
||||
console.error(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue