JavaScript Run-time Errors

JavaScript run-time errors are errors that occur when your script attempts to perform an action that the system cannot execute. You may see run-time errors when variable expressions are being evaluated or memory is being allocated.

Windows Runtime Errors

If you are using Windows Runtime APIs in your Windows 8.x Store app, you may see JavaScript errors that have been converted from Windows Runtime HRESULTs. Windows Runtime HRESULTs in the range over 0x80070000 are converted to JavaScript errors by taking the hexadecimal value of the low bits and converting it to a decimal. For example, the HRESULT 0x80070032 is converted to the decimal value 50, and the JavaScript error is SCRIPT50. The HRESULT 0x80074005 is converted to the decimal value 16389, and the JavaScript error is SCRIPT16389.


Error Number Description
5 Access is denied
438 Object doesn't support this property or method
1001 Out of memory
5029 Array length must be a finite positive integer
5030 Array length must be assigned a finite positive number
5028 Array or arguments object expected
5010 Boolean expected
5003 Cannot assign to a function result
5000 Cannot assign to 'this'
5034 Circular reference in value argument not supported
5006 Date object expected
5015 Enumerator object expected
5022 Exception thrown and not caught
5020 Expected ')' in regular expression
5019 Expected ']' in regular expression
5023 Function does not have a valid prototype object
5002 Function expected
5008 Illegal assignment
5021 Invalid range in character set
5035 Invalid replacer argument
5014 JavaScript object expected
5001 Number expected
5007 Object expected
5012 Object member expected
5016 Regular Expression object expected
5005 String expected
5017 Syntax error in regular expression
5026 The number of fractional digits is out of range
5027 The precision is out of range
5025 The URI to be decoded is not a valid encoding
5024 The URI to be encoded contains an invalid character
5009 Undefined identifier
5018 Unexpected quantifier
5013 VBArray expected

See Also

JavaScript Syntax Errors