view src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/ @ 1265:6af2ee7b09a9

8079470: Misleading error message when explicit signature constructor is called with wrong arguments Reviewed-by: jlaskey, hannesw
author sundar
date Wed, 06 May 2015 20:04:42 +0530
parents 7939ae855d57
children 1bd45e5ecf6a
line wrap: on
line source

# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit if you need additional information or have any
# questions.
lexer.error.edit.string.missing.brace=Edit string expression missing closing brace string missing end marker "{0}"
lexer.error.missing.close.quote=Missing close quote space after numeric literal
lexer.error.invalid.hex=Invalid hex digit use octal escapes in strict mode
lexer.error.json.invalid.number=Invalid JSON number format
lexer.error.invalid.escape.char=Invalid escape character
lexer.error.illegal.identifier.character=Illegal character in identifier

parser.error.illegal.continue.stmt=Illegal continue statement
parser.error.illegal.break.stmt=Illegal break statement
parser.error.invalid.lvalue=Invalid left hand side for assignment
parser.error.undefined.label=Undefined Label "{0}"
parser.error.duplicate.label=Duplicate Label "{0}" already has default case
parser.error.expected.literal=Expected a literal but found {0}
parser.error.expected.operand=Expected an operand but found {0}
parser.error.expected.stmt=Expected statement but found {0}
parser.error.expected.comma=Expected comma but found {0} property id but found {0}
parser.error.expected.lvalue=Expected l-value but found {0}
parser.error.expected=Expected {0} but found {1}
parser.error.invalid.return=Invalid return statement declarations can only occur at program or function body level. You should use a function expression here instead. declarations should only occur at program or function body level. Function declaration in nested block was converted to a function expression. "{0}" already defined
parser.error.unexpected.token=Unexpected token: {0} each can only be used with one variable allowed in loop left side value of loop
parser.error.missing.catch.or.finally=Missing catch or finally after try
parser.error.regex.unsupported.flag=Unsupported RegExp flag: {0}
parser.error.regex.repeated.flag=Repeated RegExp flag: {0}
parser.error.regex.syntax={0} comma is not allowed in JSON
parser.error.missing.const.assignment=Missing assignment to constant "{0}"

# strict mode error messages"with" statement cannot be used in strict mode"{0}" cannot be used as {1} in strict mode
parser.error.strict.cant.delete.ident=cannot delete identifier "{0}" in strict mode
parser.error.strict.param.redefinition=strict mode function cannot have duplicate parameter name "{0}" use octal value in strict mode strict mode, function declarations can only occur at program or function body level. You should use a function expression here instead.
type.error.strict.getter.setter.poison=In strict mode, "caller", "callee", and "arguments" properties can not be accessed on functions or the arguments object

# not the expected type in a given context{0} is not an Object
type.error.not.a.boolean={0} is not a Boolean{0} is not a Date{0} is not a JavaImporter object
type.error.not.a.number={0} is not a Number
type.error.not.a.regexp={0} is not a RegExp
type.error.not.a.string={0} is not a String
type.error.not.a.function={0} is not a function
type.error.not.a.constructor={0} is not a constructor function
type.error.not.a.file={0} is not a File
type.error.not.a.numeric.array={0} is not a numeric array
type.error.not.a.bytebuffer={0} is not a java.nio.ByteBuffer argument to DataView constructor must be an ArrayBuffer reflection not supported when class filter is present

# operations not permitted on undefined call undefined read property "{0}" from undefined set property "{0}" of undefined delete property "{0}" of undefined

# other wrong usages of property set property "{0}" of {1} that has only a getter set Object {0}''s __proto__ to be a non-object like {1}{1} has no such function "{0}" such Java class: {0} such Java constructor: {0}
type.error.improper.constructor.signature=Java constructor signature invalid: {0} get property "{0}" of {1} set property "{0}" of {1} delete property "{0}" of {1} redefine property "{0}" of {1}"{0}" is not a writable property of {1}
type.error.object.non.extensible=Cannot add new property "{0}" to non-extensible {1}
type.error.__proto__.set.non.extensible=Cannot set __proto__ of non-extensible {0}
type.error.circular.__proto__.set=Cannot create__proto__ cycle for {0}

# miscellaneous supply flags when constructing one RegExp from another property descriptor
type.error.bad.default.value=bad default value: {0}
type.error.function.apply.expects.array=Function.prototype.apply expects an Array for second argument
type.error.instanceof.on.non.object=instanceof must be called with a javascript or java object as the right-hand argument {0} cannot be converted to {1} due to "{2}"
type.error.array.reduce.invalid.init=invalid initialValue for Array.prototype.reduce
type.error.array.reduceright.invalid.init=invalid initialValue for Array.prototype.reduceRight
type.error.assign.constant=Assignment to constant "{0}"
type.error.cannot.get.default.string=Cannot get default string value
type.error.cannot.get.default.number=Cannot get default number value apply "with" to null apply "with" to undefined apply "with" to non script object hand side of "in" cannot be non-Object, found {0}"prototype" of {0} is not an Object, it is {1}
type.error.cant.load.script=Cannot load script from {0}
type.error.JSON.stringify.cyclic=JSON.stringify got a cyclic data structure convert string to character; its length must be exactly 1 convert number to character; it is out of 0-65535 range convert object of type {0} to a Java argument of string type convert object of type {0} to a Java argument of number type only convert Java arrays and lists to JavaScript arrays. Cannot convert object of type {0}. needs at least one argument. needs at least one type argument. needs Java types as its arguments.
type.error.extend.ambiguous.defining.class=There is no class loader that can see all of {0} at once.
type.error.extend.ERROR_FINAL_CLASS=Can not extend final class {0}.
type.error.extend.ERROR_NON_PUBLIC_CLASS=Can not extend/implement non-public class/interface {0}.
type.error.extend.ERROR_NO_ACCESSIBLE_CONSTRUCTOR=Can not extend class {0} as it has no public or protected constructors.
type.error.extend.ERROR_MULTIPLE_SUPERCLASSES=Can not extend multiple classes {0}. At most one of the specified types can be a class, the rest must all be interfaces.
type.error.extend.ERROR_NO_COMMON_LOADER=Can not find a common class loader for ScriptObject and {0}.
type.error.extend.ERROR_FINAL_FINALIZER=Can not extend class because {0} has a final finalize method.
type.error.extend.ERROR_OTHER=Can not extend/implement {0} because of {1} not construct {0} with the passed arguments; they do not match any of its constructor signatures. not invoke method {0} with the passed arguments; they do not match any of its method signatures. not create new object with constructor {0} with the passed arguments; they do not match any of its method signatures.
type.error.method.not.constructor=Java method {0} cannot be used as a constructor.
type.error.env.not.object=$ENV must be an Object. target type {0}. {0} requires "new". cannot be used with non-public java type {0}.

range.error.dataview.constructor.offset=Wrong offset or length in DataView constructor
range.error.dataview.offset=Offset is outside the bounds of the DataView
range.error.inappropriate.array.length=inappropriate array length: {0}
range.error.inappropriate.array.buffer.length=inappropriate array buffer length: {0}
range.error.invalid.fraction.digits=fractionDigits argument to {0} must be in [0, 20]
range.error.invalid.precision=precision argument toPrecision() must be in [1, 21]
range.error.invalid.radix=radix argument must be in [2, 36] Date
range.error.too.many.errors=Script contains too many errors: {0} errors
range.error.concat.string.too.big=Concatenated String is too big

reference.error.not.defined="{0}" is not defined"{0}" can not be used as the left-hand side of assignment

syntax.error.invalid.json=Invalid JSON: {0}
syntax.error.strict.cant.delete=cannot delete "{0}" in strict mode
syntax.error.redeclare.variable=Variable "{0}" has already been declared
syntax.error.unprotected.switch.declaration=Unsupported {0} declaration in unprotected switch statement

io.error.cant.write=cannot write "{0}" destination directory supplied

uri.error.bad.uri=Bad URI "{0}" near offset {1}