开发者

Rhino - Set FEATURE_LOCATION_INFORMATION_IN_ERROR in code?

开发者 https://www.devze.com 2023-01-01 17:32 出处:网络
I\'d like fileName, lineNumber and stack traces to automatically be provided by Rhino for any errors.

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, an开发者_如何学运维d 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消