changeset 1382:cd840e74bc74

8067931: Improve error message when with statement is passed a POJO Reviewed-by: lagergren, sundar
author attila
date Wed, 13 May 2015 09:38:59 -0500
parents 55c1eef5c4fc
children ea7358a68734
files src/jdk/nashorn/internal/runtime/resources/Messages.properties
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk/nashorn/internal/runtime/resources/Messages.properties	Wed May 06 15:46:54 2015 +0200
+++ b/src/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}