tags:

views:

9

answers:

1

I'd like fileName, lineNumber and stack traces to automatically be provided by Rhino for any errors.

I've been told that I need to set FEATURE_LOCATION_INFORMATION_IN_ERROR on the current context, but I'm not sure how to do this in code.

Does anybody have an example of turning this feature on so that I can see stacktrace dumps on crashes?

I'm using Rhino as part of Narwhal/Jack, and so that complicates things a bit, and I think the easiest way to at least get moving forward is if I can set it through code.

Thanks.

A: 

I solved this by overridding Context and providing my own implementation for hasFeature(int) that returned true for the feature(s) I want. Pretty lame that mozilla didn't put that in config somewhere.

Scott