When trying to require() a module which does not exist I would expect an error code to be provided when an error is thrown. Node.js throws "MODULE_NOT_FOUND" as the err.code, but Overte simply returns undefined instead.
Made a little test script:
module_not_found.js
Node.js output:
MODULE_NOT_FOUND
Finished test.
Overte output:
[07/20 08:09:03] [DEBUG] [overte.scriptengine] [module_not_found.js] error: undefined
When trying to
require()a module which does not exist I would expect an error code to be provided when an error is thrown. Node.js throws"MODULE_NOT_FOUND"as theerr.code, but Overte simply returnsundefinedinstead.Made a little test script:
module_not_found.js
Node.js output:
Overte output: