get default string value
buddhi mihara
buddhi.mihara at live.com
Wed Feb 5 03:25:10 PST 2014
i registered a custom object call process using java(class extends from ScriptObject class).but when i do following it throws an exceptions
var obj = {foo:23};Object.bindProperties(process,obj)
Exception in thread "main" ECMAScript Exception: TypeError: Cannot get default string value at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213) at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185) at jdk.nashorn.internal.objects.Global.getDefaultValue(Global.java:571) at jdk.nashorn.internal.runtime.ScriptObject.getDefaultValue(ScriptObject.java:1257) at jdk.nashorn.internal.runtime.JSType.toPrimitive(JSType.java:264) at jdk.nashorn.internal.runtime.JSType.toStringImpl(JSType.java:901) at jdk.nashorn.internal.runtime.JSType.toString(JSType.java:323) at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:450) at jdk.nashorn.tools.Shell.run(Shell.java:162) at jdk.nashorn.tools.Shell.main(Shell.java:134) at jdk.nashorn.tools.Shell.main(Shell.java:113)
solution please
More information about the nashorn-dev
mailing list