8067931: Improve error message when with statement is passed a POJO
Reviewed-by: lagergren, sundar
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Messages.properties Wed May 13 15:41:46 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Messages.properties Wed May 13 09:38:59 2015 -0500
@@ -121,7 +121,7 @@
type.error.cannot.get.default.number=Cannot get default number value
type.error.cant.apply.with.to.null=Cannot apply "with" to null
type.error.cant.apply.with.to.undefined=Cannot apply "with" to undefined
-type.error.cant.apply.with.to.non.scriptobject=Cannot apply "with" to non script object
+type.error.cant.apply.with.to.non.scriptobject=Cannot apply "with" to non script object. Consider using "with(Object.bindProperties('{'}, nonScriptObject))".
type.error.in.with.non.object=Right hand side of "in" cannot be non-Object, found {0}
type.error.prototype.not.an.object="prototype" of {0} is not an Object, it is {1}
type.error.cant.load.script=Cannot load script from {0}