This documentation is archived and is not being maintained.

JSError Enumeration

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.

Namespace:  Microsoft.JScript
Assembly:  Microsoft.JScript (in Microsoft.JScript.dll)

'Declaration
<ComVisibleAttribute(True)> _
<GuidAttribute("268CA962-2FEF-3152-BA46-E18658B7FA4F")> _
Public Enumeration JSError
'Usage
Dim instance As JSError

Member nameDescription
NoErrorNo error. This is the default (0) value for the enumeration.
InvalidCallInvalid procedure call or argument.
OutOfMemoryOut of memory.
TypeMismatchType mismatch.
OutOfStackOut of stack space.
InternalErrorAn internal error has been thrown.
FileNotFoundFile not found.
NeedObjectAn object is required.
CantCreateObjectCannot create object.
OLENoPropOrMethodObject does not support this property or method.
ActionNotSupportedThe object does not support this action.
NotCollectionThis object is not a collection.
SyntaxErrorDiscovered syntax error.
NoColonExpected ":".
NoSemicolonExpected ";".
NoLeftParenExpected "(".
NoRightParenExpected ")".
NoRightBracketExpected "]".
NoLeftCurlyExpected "{".
NoRightCurlyExpected "}".
NoIdentifierExpected identifier.
NoEqualExpected "=".
IllegalCharInvalid character.
UnterminatedStringString constant not terminated.
NoCommentEndComment not terminated.
BadReturnReturn statement cannot appear outside the function.
BadBreakCannot have break outside the loop.
BadContinueCannot have continue outside the loop.
BadHexDigitExpected hexadecimal digit.
NoWhileExpected while.
BadLabelThere is already a label that has that name.
NoLabelLabel not found.
DupDefaultdefault can appear only once in a switch statement.
NoMemberIdentifierExpected identifier or string.
NoCcEndExpected @end.
CcOffConditional compilation is turned off.
NotConstExpected constant.
NoAtExpected @.
NoCatchExpected catch.
InvalidElseUnmatched else; no if defined.
NoCommaExpected ",".
DupVisibilityVisibility modifier already defined.
IllegalVisibilityInvalid visibility modifier.
BadSwitchMissing case or default statement.
CcInvalidEndUnmatched @end; no @if defined.
CcInvalidElseUnmatched @else; no @if defined.
CcInvalidElifUnmatched @elif; no @if defined.
ErrEOFExpecting more source characters.
IncompatibleVisibilityIncompatible visibility modifier.
ClassNotAllowedClass definition not allowed in this context.
NeedCompileTimeConstantAn expression must be a compile-time constant.
DuplicateNameIdentifier already in use.
NeedTypeA type name is expected.
NotInsideClassValid only inside a class definition.
InvalidPositionDirectiveAn unknown position directive was discovered.
MustBeEOLDirective cannot be followed by other code on the same line.
WrongDirectiveWrong debugger directive or wrong position for the directive.
CannotNestPositionDirectivePosition directive must be ended before a new one can be started.
CircularDefinitionCircular definition.
DeprecatedThe specified type is deprecated.
IllegalUseOfThisIt is not valid to use this in the current context.
NotAccessibleThe object or member is not accessible from this scope.
CannotUseNameOfClassOnly a constructor function can have the same name as the class it appears in.
MustImplementMethodThe class must provide an implementation of the method.
NeedInterfaceAn interface name is expected.
UnreachableCatchCatch clause will never be reached.
TypeCannotBeExtendedType cannot be extended.
UndeclaredVariableVariable has not been declared.
VariableLeftUninitializedUninitialized variables are dangerous and slow to use. Did you intend to leave it uninitialized?
KeywordUsedAsIdentifierYou cannot use a reserved word as an identifier.
NotAllowedInSuperConstructorCallObject or member is not allowed in a call to the base class constructor.
NotMeantToBeCalledDirectlyYou cannot call this method directly. If possible, use property accessors instead.
GetAndSetAreInconsistentThe get and set methods of this property do not match each other.
InvalidCustomAttributeA custom attribute class must derive from Attribute.
InvalidCustomAttributeArgumentOnly primitive types are allowed in a custom attribute constructor arguments list.
InvalidCustomAttributeClassOrCtorUnknown custom attribute class or constructor.
TooManyParametersThere are too many actual parameters. The excess parameters will be ignored.
AmbiguousBindingBecauseOfWithThe With statement has made the use of this name ambiguous.
AmbiguousBindingBecauseOfEvalThe presence of Eval has made the use of this name ambiguous.
NoSuchMemberObjects of this type do not have such a member.
ItemNotAllowedOnExpandoClassCannot define the property Item on an Expando class. This Item is reserved for the Expando fields.
MethodNotAllowedOnExpandoClassCannot define a property named Item on an Expando class.
MethodClashOnExpandoSuperClassCannot create the Expando class because a property named Item is already defined in the class hierarchy.
BaseClassIsExpandoAlreadyA base class is already marked Expando; current specification will be ignored.
AbstractCannotBePrivateAn abstract method cannot be private.
NotIndexableObjects of this type are not indexable.
StaticMissingInStaticInitStatic initializer must specify the static keyword.
MissingConstructForAttributesThe list of attributes does not apply to the current context.
OnlyClassesAllowedOnly classes are allowed inside a package.
ExpandoClassShouldNotImpleEnumerableExpando classes should not implement IEnumerable. The interface is implicitly defined on Expando classes.
NonCLSCompliantMemberThe specified member is not CLS compliant.
NotDeletableThe object or member cannot be deleted.
PackageExpectedPackage name expected.
UselessExpressionExpression has no effect.
HidesParentMemberbase class already contains a member by this name.
CannotChangeVisibilityCannot change visibility specification of a base method.
HidesAbstractInBaseMethod hides abstract in a base class.
NewNotSpecifiedInMethodDeclarationA method matches a method in a base class. Must specify override or hide.
MethodInBaseIsNotVirtualA method in a base class that is final or not virtual override is ignored. Specify hide.
NoMethodInBaseToNewThere is no member in a base class to hide.
DifferentReturnTypeFromBaseMethod in base has a different return type.
ClashWithPropertyThe name of the field conflicts with the name of the property.
OverrideAndHideUsedTogetherCannot use override and hide together in a member declaration.
InvalidLanguageOptionMust specify either "fast" or "versionSafe" language option.
NoMethodInBaseToOverrideThere is no member in a base class to override.
NotValidForConstructorNot valid for a constructor.
CannotReturnValueFromVoidFunctionCannot return a value from a void function or constructor.
AmbiguousMatchMore than one method or property matches this parameter list.
AmbiguousConstructorCallMore than one constructor matches this parameter list.
SuperClassConstructorNotAccessibleBase class constructor is not accessible from this scope.
OctalLiteralsAreDeprecatedOctal literals are deprecated.
VariableMightBeUnitializedVariable might not be initialized.
NotOKToCallSuperIt is not valid to call a base class constructor from this location.
IllegalUseOfSuperIt is not valid to use the base class in this way.
BadWayToLeaveFinallyIt is slow and potentially confusing to leave a finally block this way.
NoCommaOrTypeDefinitionErrorExpected "," or invalid type declaration; write "<Identifier> : <Type>" not "<Type> <Identifier>".
AbstractWithBodyAn abstract function cannot have a body.
NoRightParenOrCommaExpected "," or ")".
NoRightBracketOrCommaExpected "," or "]".
ExpressionExpectedExpected expression.
UnexpectedSemicolonUnexpected ";".
TooManyTokensSkippedToo many errors. The file might not be a JScript file.
BadVariableDeclarationPossible invalid variable declaration, var missing, or unrecognized syntax error.
BadFunctionDeclarationPossible invalid function declaration, function missing, or unrecognized syntax error.
BadPropertyDeclarationInvalid property declaration. The get accessor must not have arguments and the set accessor must have one argument.
DoesNotHaveAnAddressExpression does not have an address.
TooFewParametersNot all required parameters have been supplied.
UselessAssignmentAn assignment creates an Expando property that is immediately thrown away.
SuspectAssignmentIf condition cannot contain an assignment.
SuspectSemicolonEmpty statement found in if statement.
ImpossibleConversionThe specified conversion or coercion is not possible.
FinalPrecludesAbstractfinal and abstract cannot be used together.
NeedInstanceAn instance is expected.
CannotBeAbstractCannot be abstract unless class is marked as abstract.
InvalidBaseTypeForEnumenum base type must be a primitive integral type.
CannotInstantiateAbstractClassIt is not possible to construct an instance of an abstract class.
ArrayMayBeCopiedAssigning a JScript array to a System.Array may cause the array to be copied.
AbstractCannotBeStaticStatic methods cannot be abstract.
StaticIsAlreadyFinalStatic methods cannot be final.
StaticMethodsCannotOverrideStatic methods cannot override base class methods.
StaticMethodsCannotHideStatic methods cannot hide base class methods.
ExpandoPrecludesOverrideExpando methods cannot override base class methods.
IllegalParamArrayAttributeA variable argument list must be of an array type.
ExpandoPrecludesAbstractExpando methods cannot be abstract.
ShouldBeAbstractA function without a body should be abstract.
BadModifierInInterfaceThis modifier cannot be used on an interface member.
VarIllegalInInterfaceVariables cannot be declared in an interface.
InterfaceIllegalInInterfaceInterfaces cannot be declared in an interface.
NoVarInEnumenum member declarations should not use the var keyword.
InvalidImportThe import statement is not valid in this context.
EnumNotAllowedenum definition not allowed in this context.
InvalidCustomAttributeTargetThis attribute is not valid for this type of declaration.
PackageInWrongContextPackage definition is not allowed in this context.
ConstructorMayNotHaveReturnTypeA constructor cannot have a return type.
OnlyClassesAndPackagesAllowedOnly classes and packages are allowed inside a library.
InvalidDebugDirectiveInvalid debug directive.
CustomAttributeUsedMoreThanOnceThis type of attribute must be unique.
NestedInstanceTypeCannotBeExtendedByStaticA non-static nested type can be extended only by a non-static type nested in the same class.
PropertyLevelAttributesMustBeOnGetterAn attribute that targets the property must be specified on the get accessor, if the get accessor is present.
BadThrowA throw statement must have an argument unless it is inside the catch block of a try statement.
ParamListNotLastA variable argument list must be the last argument.
NoSuchTypeType could not be found. An assembly reference might be missing.
BadOctalLiteralMalformed octal literal treated as decimal literal.
InstanceNotAccessibleFromStaticA non-static member is not accessible from a static scope.
StaticRequiresTypeNameA static member must be accessed by the class name.
NonStaticWithTypeNameA non-static member cannot be accessed with the class name.
NoSuchStaticMemberType does not have such a static member.
SuspectLoopConditionLoop condition cannot contain a function call.
ExpectedAssemblyExpected assembly.
AssemblyAttributesMustBeGlobalAssembly custom attributes cannot be part of another construct.
ExpandoPrecludesStaticExpando methods cannot be static.
DuplicateMethodThis method has the same name, parameter types, and return type as another method in this class.
NotAnExpandoFunctionClass members used as constructors should be marked as Expando functions.
NotValidVersionStringNot a valid version string.
ExecutablesCannotBeLocalizedExecutables cannot be localized; Culture should always be empty.
StringConcatIsSlowThe plus operator is a slow way to concatenate strings. Consider using System.Text.StringBuilder instead.
CcInvalidInDebuggerConditional compilation directives and variables cannot be used in the debugger.
ExpandoMustBePublicExpando methods must be public.
DelegatesShouldNotBeExplicitlyConstructedDelegates should not be explicitly constructed; simply use the method name.
ImplicitlyReferencedAssemblyNotFoundA referenced assembly depends on another assembly that is not referenced or could not be found.
PossibleBadConversionThis conversion may fail at runtime.
PossibleBadConversionFromStringConverting a string to a number or Boolean is slow and may fail at run time.
InvalidResourceThis is not a valid .resources file.
WrongUseOfAddressOfThe address of operator can be used only in a list of arguments.
NonCLSCompliantTypeThe specified type is not CLS compliant.
MemberTypeCLSCompliantMismatchClass member cannot be marked Common Language Specification (CLS) compliant because the class is not marked CLS compliant.
TypeAssemblyCLSCompliantMismatchType cannot be marked CLS compliant because the assembly is not marked as CLS compliant.
IncompatibleAssemblyReferenceThe assembly referenced is incompatible.
InvalidAssemblyKeyFileAn invalid assembly key file has been used.
TypeNameTooLongThe fully qualified type name is too long. It must be less than 1,024 characters.
MemberInitializerCannotContainFuncExprA member initializer cannot contain a function expression.
CantAssignThisCannot assign to this.
NumberExpectedExpected a number.
FunctionExpectedA function was expected.
CannotAssignToFunctionResultCannot assign to a function result.
StringExpectedString expected.
DateExpectedDate object expected.
ObjectExpectedExpected an object.
IllegalAssignmentInvalid assignment.
UndefinedIdentifierUndefined identifier.
BooleanExpectedNo Boolean value found.
VBArrayExpectedA VBArray is expected.
EnumeratorExpectedEnumerator object expected.
RegExpExpectedRegExpObject object expected.
RegExpSyntaxSyntax error in regular expression.
UncaughtExceptionException thrown and not caught.
InvalidPrototypeThis function does not have a valid prototype object.
URIEncodeErrorThe URI to be encoded contains an invalid character.
URIDecodeErrorThe URI to be decoded is not a valid encoding.
FractionOutOfRangeThe number of fractional digits is out of range.
PrecisionOutOfRangeThe precision is out of range.
ArrayLengthConstructIncorrectArray length must be a finite positive integer.
ArrayLengthAssignIncorrectArray length must be assigned a finite positive number.
NeedArrayObjectA "|" is not an array object. Array object expected.
NoConstructorNo such constructor.
IllegalEvalAn Eval cannot be called by an alias.
NotYetImplementedNot yet implemented.
MustProvideNameForNamedParameterCannot provide null or empty named parameter name.
DuplicateNamedParameterDuplicate named parameter.
MissingNameParameterThe specified named parameter name is not one of the formal parameters.
MoreNamedParametersThanArgumentsToo few arguments specified. The number of named parameter names cannot exceed the number of arguments passed in.
NonSupportedInDebuggerThe expression cannot be evaluated in the debugger.
AssignmentToReadOnlyCannot assign to read-only field or property.
WriteOnlyPropertyThe property is write-only.
IncorrectNumberOfIndicesThe number of indices does not match the dimension of the array.
RefParamsNonSupportedInDebuggerMethods with ref parameters cannot be called in the debugger.
CannotCallSecurityMethodLateBoundThe Deny, PermitOnly, and Assert security methods cannot be called using late binding.
CannotUseStaticSecurityAttributeJScript does not support static security attributes.
NonClsExceptionA target threw a non-CLS exception.
FuncEvalAbortedFunction evaluation was aborted.
FuncEvalTimedoutFunction evaluation timed out.
FuncEvalThreadSuspendedFunction evaluation failed. The thread is suspended.
FuncEvalThreadSleepWaitJoinFunction evaluation failed. The thread is sleeping, waiting for an object, or waiting for another thread to finish.
FuncEvalBadThreadStateFunction evaluation failed. The thread can contain incorrect data.
FuncEvalBadThreadNotStartedFunction evaluation failed and the thread has not started.
NoFuncEvalAllowedFunction evaluation aborted. To turn on property evaluation, click Options on the Tools menu and then select the Debugging in the tree view.
FuncEvalBadLocationFunction evaluation cannot be done when stopped at this point in the program.
FuncEvalWebMethodCannot call a Web method in the debugger.
StaticVarNotAvailableA static variable is not available.
TypeObjectNotAvailableThe type object for this type is not available.
ExceptionFromHResultException from HRESULT.
SideEffectsDisallowedThe expression causes side effects and will not be evaluated.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: