Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Returning syntax error location


Well, in our case, it did not work that way!

We are using Node.js code to ‘require’ our scripts as in the following stack trace:

ScriptEngineException Error loading module /NativeModeApi.js: Syntax error

at (NativeModeApi.js:38:4) -> try {

at anonymous (anonymous code:3:12) -> __scriptGlobal.executeModule('/NativeModeApi.js',require,exports,module)

at buildModule (modules.js:429:6) -> exports = factory.call(null, module.require, module.exports, module)

at memoizeModule (modules.js:380:8) -> buildModule(cache_memo[id].module, factory)

at eventLoad (modules.js:246:4) -> memoizeModule(id, this, event.target.responseText, false)

at JScript anonymous function (modules.js:14:303) -> return e.apply(this instanceof c ? this : b || window, f.concat(a.call(arguments)))

at JScript anonymous function (modules.js:222:10) -> xhr.send(null)

at require (modules.js:275:8) -> module.load(id, null)

at JScript global code (Script Document [temp]:0:0) -> __scriptTestBase.scanScript(require('NativeModeApi'))

The top line points to the line in the test script at which I purposely introduced a syntax error.

Without the change we made as specified in myoriginal post (i.e. the original 5.4.1 code), the top line, “at (NativeModeApi.js:38:4) -> try {“

Is not present.

Viewing all articles
Browse latest Browse all 2297