hannes%helma.at 70afc83cfa Patch for bug 549604 - Add (non ECMA) property "stack" to NativeError
This adds a new getScriptStack() method to RhinoException, returning an
array of instances of the also new ScriptStackElement class.
This is used to allow applying different formatting styles when generating
the `stack` property on NativeError objects.

By default, the "traditional" Rhino script stack format is used. There
is a static useMozillaStackStyle(boolean) in RhinoException to use
the Mozilla/Firefox script stack rendring format instead.

Also, function names are now included in script stacks from
compiled code, and the stack property is also generated on Errors
constructed and thrown by script code if the
FEATURE_LOCATION_INFORMATION_IN_ERROR is enabled (the latter is now
done in JavaScriptException constructor instead of NativeError to
avoid duplication of effort).

Original patch and tests by Marc Guillemot.


git-svn-id: svn://10.0.0.236/trunk@260117 18797224-902f-48f8-a5cc-f745e15eee43
2010-03-31 15:12:45 +00:00
..