Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve script error reporting #1396
This issue is to track a particular idea I have. If the idea turns out to be no good, then there will be no fix/change for it.
Via any mechanism (likely a JS module), make a file with as little code as possible, all on one line, which actually calls
added a commit
Aug 19, 2011
Couldn't we use the last two arguments for Components.utils.evalInSandbox detailed here?
So the call in modules/runScript.js would look something like:
Components.utils.evalInSandbox(code, sandbox, maxJSVersion, filename, 1);
We could loop through all the
Today, they're all evaluated inside the same anonymous function and thus cannot be broken up.We could execute them all inside separate anonymous functions and bind their
Or we could try executing the script and requires without an anonymous function and if we catch one of the tell-tail errors from one of them we could try re-executing it inside an anonymous function. I believe this is the method Scriptish uses.
Either that or we can just keep doing what were doing and use the fifth argument on evalInSandbox to force the line count to start at 1.
On Fri Aug 19 15:47:57 2011, sizzlemctwizzle wrote:
That would be very much a breaking change. Pretty much every required