This documentation is archived and is not being maintained.
JSError Enumeration
Visual Studio 2010
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Specifies the JScript error messages. This class belongs to the compilation and run-time state category.
Assembly: Microsoft.JScript (in Microsoft.JScript.dll)
| Member name | Description | |
|---|---|---|
| NoError | No error. This is the default (0) value for the enumeration. | |
| InvalidCall | Invalid procedure call or argument. | |
| OutOfMemory | Out of memory. | |
| TypeMismatch | Type mismatch. | |
| OutOfStack | Out of stack space. | |
| InternalError | An internal error has been thrown. | |
| FileNotFound | File not found. | |
| NeedObject | An object is required. | |
| CantCreateObject | Cannot create object. | |
| OLENoPropOrMethod | Object does not support this property or method. | |
| ActionNotSupported | The object does not support this action. | |
| NotCollection | This object is not a collection. | |
| SyntaxError | Discovered syntax error. | |
| NoColon | Expected ":". | |
| NoSemicolon | Expected ";". | |
| NoLeftParen | Expected "(". | |
| NoRightParen | Expected ")". | |
| NoRightBracket | Expected "]". | |
| NoLeftCurly | Expected "{". | |
| NoRightCurly | Expected "}". | |
| NoIdentifier | Expected identifier. | |
| NoEqual | Expected "=". | |
| IllegalChar | Invalid character. | |
| UnterminatedString | String constant not terminated. | |
| NoCommentEnd | Comment not terminated. | |
| BadReturn | Return statement cannot appear outside the function. | |
| BadBreak | Cannot have break outside the loop. | |
| BadContinue | Cannot have continue outside the loop. | |
| BadHexDigit | Expected hexadecimal digit. | |
| NoWhile | Expected while. | |
| BadLabel | There is already a label that has that name. | |
| NoLabel | Label not found. | |
| DupDefault | default can appear only once in a switch statement. | |
| NoMemberIdentifier | Expected identifier or string. | |
| NoCcEnd | Expected @end. | |
| CcOff | Conditional compilation is turned off. | |
| NotConst | Expected constant. | |
| NoAt | Expected @. | |
| NoCatch | Expected catch. | |
| InvalidElse | Unmatched else; no if defined. | |
| NoComma | Expected ",". | |
| DupVisibility | Visibility modifier already defined. | |
| IllegalVisibility | Invalid visibility modifier. | |
| BadSwitch | Missing case or default statement. | |
| CcInvalidEnd | Unmatched @end; no @if defined. | |
| CcInvalidElse | Unmatched @else; no @if defined. | |
| CcInvalidElif | Unmatched @elif; no @if defined. | |
| ErrEOF | Expecting more source characters. | |
| IncompatibleVisibility | Incompatible visibility modifier. | |
| ClassNotAllowed | Class definition not allowed in this context. | |
| NeedCompileTimeConstant | An expression must be a compile-time constant. | |
| DuplicateName | Identifier already in use. | |
| NeedType | A type name is expected. | |
| NotInsideClass | Valid only inside a class definition. | |
| InvalidPositionDirective | An unknown position directive was discovered. | |
| MustBeEOL | Directive cannot be followed by other code on the same line. | |
| WrongDirective | Wrong debugger directive or wrong position for the directive. | |
| CannotNestPositionDirective | Position directive must be ended before a new one can be started. | |
| CircularDefinition | Circular definition. | |
| Deprecated | The specified type is deprecated. | |
| IllegalUseOfThis | It is not valid to use this in the current context. | |
| NotAccessible | The object or member is not accessible from this scope. | |
| CannotUseNameOfClass | Only a constructor function can have the same name as the class it appears in. | |
| MustImplementMethod | The class must provide an implementation of the method. | |
| NeedInterface | An interface name is expected. | |
| UnreachableCatch | Catch clause will never be reached. | |
| TypeCannotBeExtended | Type cannot be extended. | |
| UndeclaredVariable | Variable has not been declared. | |
| VariableLeftUninitialized | Uninitialized variables are dangerous and slow to use. Did you intend to leave it uninitialized? | |
| KeywordUsedAsIdentifier | You cannot use a reserved word as an identifier. | |
| NotAllowedInSuperConstructorCall | Object or member is not allowed in a call to the base class constructor. | |
| NotMeantToBeCalledDirectly | You cannot call this method directly. If possible, use property accessors instead. | |
| GetAndSetAreInconsistent | The get and set methods of this property do not match each other. | |
| InvalidCustomAttribute | A custom attribute class must derive from Attribute. | |
| InvalidCustomAttributeArgument | Only primitive types are allowed in a custom attribute constructor arguments list. | |
| InvalidCustomAttributeClassOrCtor | Unknown custom attribute class or constructor. | |
| TooManyParameters | There are too many actual parameters. The excess parameters will be ignored. | |
| AmbiguousBindingBecauseOfWith | The With statement has made the use of this name ambiguous. | |
| AmbiguousBindingBecauseOfEval | The presence of Eval has made the use of this name ambiguous. | |
| NoSuchMember | Objects of this type do not have such a member. | |
| ItemNotAllowedOnExpandoClass | Cannot define the property Item on an Expando class. This Item is reserved for the Expando fields. | |
| MethodNotAllowedOnExpandoClass | Cannot define a property named Item on an Expando class. | |
| MethodClashOnExpandoSuperClass | Cannot create the Expando class because a property named Item is already defined in the class hierarchy. | |
| BaseClassIsExpandoAlready | A base class is already marked Expando; current specification will be ignored. | |
| AbstractCannotBePrivate | An abstract method cannot be private. | |
| NotIndexable | Objects of this type are not indexable. | |
| StaticMissingInStaticInit | Static initializer must specify the static keyword. | |
| MissingConstructForAttributes | The list of attributes does not apply to the current context. | |
| OnlyClassesAllowed | Only classes are allowed inside a package. | |
| ExpandoClassShouldNotImpleEnumerable | Expando classes should not implement IEnumerable. The interface is implicitly defined on Expando classes. | |
| NonCLSCompliantMember | The specified member is not CLS compliant. | |
| NotDeletable | The object or member cannot be deleted. | |
| PackageExpected | Package name expected. | |
| UselessExpression | Expression has no effect. | |
| HidesParentMember | base class already contains a member by this name. | |
| CannotChangeVisibility | Cannot change visibility specification of a base method. | |
| HidesAbstractInBase | Method hides abstract in a base class. | |
| NewNotSpecifiedInMethodDeclaration | A method matches a method in a base class. Must specify override or hide. | |
| MethodInBaseIsNotVirtual | A method in a base class that is final or not virtual override is ignored. Specify hide. | |
| NoMethodInBaseToNew | There is no member in a base class to hide. | |
| DifferentReturnTypeFromBase | Method in base has a different return type. | |
| ClashWithProperty | The name of the field conflicts with the name of the property. | |
| OverrideAndHideUsedTogether | Cannot use override and hide together in a member declaration. | |
| InvalidLanguageOption | Must specify either "fast" or "versionSafe" language option. | |
| NoMethodInBaseToOverride | There is no member in a base class to override. | |
| NotValidForConstructor | Not valid for a constructor. | |
| CannotReturnValueFromVoidFunction | Cannot return a value from a void function or constructor. | |
| AmbiguousMatch | More than one method or property matches this parameter list. | |
| AmbiguousConstructorCall | More than one constructor matches this parameter list. | |
| SuperClassConstructorNotAccessible | Base class constructor is not accessible from this scope. | |
| OctalLiteralsAreDeprecated | Octal literals are deprecated. | |
| VariableMightBeUnitialized | Variable might not be initialized. | |
| NotOKToCallSuper | It is not valid to call a base class constructor from this location. | |
| IllegalUseOfSuper | It is not valid to use the base class in this way. | |
| BadWayToLeaveFinally | It is slow and potentially confusing to leave a finally block this way. | |
| NoCommaOrTypeDefinitionError | Expected "," or invalid type declaration; write "<Identifier> : <Type>" not "<Type> <Identifier>". | |
| AbstractWithBody | An abstract function cannot have a body. | |
| NoRightParenOrComma | Expected "," or ")". | |
| NoRightBracketOrComma | Expected "," or "]". | |
| ExpressionExpected | Expected expression. | |
| UnexpectedSemicolon | Unexpected ";". | |
| TooManyTokensSkipped | Too many errors. The file might not be a JScript file. | |
| BadVariableDeclaration | Possible invalid variable declaration, var missing, or unrecognized syntax error. | |
| BadFunctionDeclaration | Possible invalid function declaration, function missing, or unrecognized syntax error. | |
| BadPropertyDeclaration | Invalid property declaration. The get accessor must not have arguments and the set accessor must have one argument. | |
| DoesNotHaveAnAddress | Expression does not have an address. | |
| TooFewParameters | Not all required parameters have been supplied. | |
| UselessAssignment | An assignment creates an Expando property that is immediately thrown away. | |
| SuspectAssignment | If condition cannot contain an assignment. | |
| SuspectSemicolon | Empty statement found in if statement. | |
| ImpossibleConversion | The specified conversion or coercion is not possible. | |
| FinalPrecludesAbstract | final and abstract cannot be used together. | |
| NeedInstance | An instance is expected. | |
| CannotBeAbstract | Cannot be abstract unless class is marked as abstract. | |
| InvalidBaseTypeForEnum | enum base type must be a primitive integral type. | |
| CannotInstantiateAbstractClass | It is not possible to construct an instance of an abstract class. | |
| ArrayMayBeCopied | Assigning a JScript array to a System::Array may cause the array to be copied. | |
| AbstractCannotBeStatic | Static methods cannot be abstract. | |
| StaticIsAlreadyFinal | Static methods cannot be final. | |
| StaticMethodsCannotOverride | Static methods cannot override base class methods. | |
| StaticMethodsCannotHide | Static methods cannot hide base class methods. | |
| ExpandoPrecludesOverride | Expando methods cannot override base class methods. | |
| IllegalParamArrayAttribute | A variable argument list must be of an array type. | |
| ExpandoPrecludesAbstract | Expando methods cannot be abstract. | |
| ShouldBeAbstract | A function without a body should be abstract. | |
| BadModifierInInterface | This modifier cannot be used on an interface member. | |
| VarIllegalInInterface | Variables cannot be declared in an interface. | |
| InterfaceIllegalInInterface | Interfaces cannot be declared in an interface. | |
| NoVarInEnum | enum member declarations should not use the var keyword. | |
| InvalidImport | The import statement is not valid in this context. | |
| EnumNotAllowed | enum definition not allowed in this context. | |
| InvalidCustomAttributeTarget | This attribute is not valid for this type of declaration. | |
| PackageInWrongContext | Package definition is not allowed in this context. | |
| ConstructorMayNotHaveReturnType | A constructor cannot have a return type. | |
| OnlyClassesAndPackagesAllowed | Only classes and packages are allowed inside a library. | |
| InvalidDebugDirective | Invalid debug directive. | |
| CustomAttributeUsedMoreThanOnce | This type of attribute must be unique. | |
| NestedInstanceTypeCannotBeExtendedByStatic | A non-static nested type can be extended only by a non-static type nested in the same class. | |
| PropertyLevelAttributesMustBeOnGetter | An attribute that targets the property must be specified on the get accessor, if the get accessor is present. | |
| BadThrow | A throw statement must have an argument unless it is inside the catch block of a try statement. | |
| ParamListNotLast | A variable argument list must be the last argument. | |
| NoSuchType | Type could not be found. An assembly reference might be missing. | |
| BadOctalLiteral | Malformed octal literal treated as decimal literal. | |
| InstanceNotAccessibleFromStatic | A non-static member is not accessible from a static scope. | |
| StaticRequiresTypeName | A static member must be accessed by the class name. | |
| NonStaticWithTypeName | A non-static member cannot be accessed with the class name. | |
| NoSuchStaticMember | Type does not have such a static member. | |
| SuspectLoopCondition | Loop condition cannot contain a function call. | |
| ExpectedAssembly | Expected assembly. | |
| AssemblyAttributesMustBeGlobal | Assembly custom attributes cannot be part of another construct. | |
| ExpandoPrecludesStatic | Expando methods cannot be static. | |
| DuplicateMethod | This method has the same name, parameter types, and return type as another method in this class. | |
| NotAnExpandoFunction | Class members used as constructors should be marked as Expando functions. | |
| NotValidVersionString | Not a valid version string. | |
| ExecutablesCannotBeLocalized | Executables cannot be localized; Culture should always be empty. | |
| StringConcatIsSlow | The plus operator is a slow way to concatenate strings. Consider using System.Text::StringBuilder instead. | |
| CcInvalidInDebugger | Conditional compilation directives and variables cannot be used in the debugger. | |
| ExpandoMustBePublic | Expando methods must be public. | |
| DelegatesShouldNotBeExplicitlyConstructed | Delegates should not be explicitly constructed; simply use the method name. | |
| ImplicitlyReferencedAssemblyNotFound | A referenced assembly depends on another assembly that is not referenced or could not be found. | |
| PossibleBadConversion | This conversion may fail at runtime. | |
| PossibleBadConversionFromString | Converting a string to a number or Boolean is slow and may fail at run time. | |
| InvalidResource | This is not a valid .resources file. | |
| WrongUseOfAddressOf | The address of operator can be used only in a list of arguments. | |
| NonCLSCompliantType | The specified type is not CLS compliant. | |
| MemberTypeCLSCompliantMismatch | Class member cannot be marked Common Language Specification (CLS) compliant because the class is not marked CLS compliant. | |
| TypeAssemblyCLSCompliantMismatch | Type cannot be marked CLS compliant because the assembly is not marked as CLS compliant. | |
| IncompatibleAssemblyReference | The assembly referenced is incompatible. | |
| InvalidAssemblyKeyFile | An invalid assembly key file has been used. | |
| TypeNameTooLong | The fully qualified type name is too long. It must be less than 1,024 characters. | |
| MemberInitializerCannotContainFuncExpr | A member initializer cannot contain a function expression. | |
| CantAssignThis | Cannot assign to this. | |
| NumberExpected | Expected a number. | |
| FunctionExpected | A function was expected. | |
| CannotAssignToFunctionResult | Cannot assign to a function result. | |
| StringExpected | String expected. | |
| DateExpected | Date object expected. | |
| ObjectExpected | Expected an object. | |
| IllegalAssignment | Invalid assignment. | |
| UndefinedIdentifier | Undefined identifier. | |
| BooleanExpected | No Boolean value found. | |
| VBArrayExpected | A VBArray is expected. | |
| EnumeratorExpected | Enumerator object expected. | |
| RegExpExpected | RegExpObject object expected. | |
| RegExpSyntax | Syntax error in regular expression. | |
| UncaughtException | Exception thrown and not caught. | |
| InvalidPrototype | This function does not have a valid prototype object. | |
| URIEncodeError | The URI to be encoded contains an invalid character. | |
| URIDecodeError | The URI to be decoded is not a valid encoding. | |
| FractionOutOfRange | The number of fractional digits is out of range. | |
| PrecisionOutOfRange | The precision is out of range. | |
| ArrayLengthConstructIncorrect | Array length must be a finite positive integer. | |
| ArrayLengthAssignIncorrect | Array length must be assigned a finite positive number. | |
| NeedArrayObject | A "|" is not an array object. Array object expected. | |
| NoConstructor | No such constructor. | |
| IllegalEval | An Eval cannot be called by an alias. | |
| NotYetImplemented | Not yet implemented. | |
| MustProvideNameForNamedParameter | Cannot provide null or empty named parameter name. | |
| DuplicateNamedParameter | Duplicate named parameter. | |
| MissingNameParameter | The specified named parameter name is not one of the formal parameters. | |
| MoreNamedParametersThanArguments | Too few arguments specified. The number of named parameter names cannot exceed the number of arguments passed in. | |
| NonSupportedInDebugger | The expression cannot be evaluated in the debugger. | |
| AssignmentToReadOnly | Cannot assign to read-only field or property. | |
| WriteOnlyProperty | The property is write-only. | |
| IncorrectNumberOfIndices | The number of indices does not match the dimension of the array. | |
| RefParamsNonSupportedInDebugger | Methods with ref parameters cannot be called in the debugger. | |
| CannotCallSecurityMethodLateBound | The Deny, PermitOnly, and Assert security methods cannot be called using late binding. | |
| CannotUseStaticSecurityAttribute | JScript does not support static security attributes. | |
| NonClsException | A target threw a non-CLS exception. | |
| FuncEvalAborted | Function evaluation was aborted. | |
| FuncEvalTimedout | Function evaluation timed out. | |
| FuncEvalThreadSuspended | Function evaluation failed. The thread is suspended. | |
| FuncEvalThreadSleepWaitJoin | Function evaluation failed. The thread is sleeping, waiting for an object, or waiting for another thread to finish. | |
| FuncEvalBadThreadState | Function evaluation failed. The thread can contain incorrect data. | |
| FuncEvalBadThreadNotStarted | Function evaluation failed and the thread has not started. | |
| NoFuncEvalAllowed | Function evaluation aborted. To turn on property evaluation, click Options on the Tools menu and then select the Debugging in the tree view. | |
| FuncEvalBadLocation | Function evaluation cannot be done when stopped at this point in the program. | |
| FuncEvalWebMethod | Cannot call a Web method in the debugger. | |
| StaticVarNotAvailable | A static variable is not available. | |
| TypeObjectNotAvailable | The type object for this type is not available. | |
| ExceptionFromHResult | Exception from HRESULT. | |
| SideEffectsDisallowed | The expression causes side effects and will not be evaluated. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: