|
| 1 | +# JavaScript error reference |
| 2 | + |
| 3 | +These errors can be a helpful debugging your code, but the reported problem isn't always immediately clear. The pages below will provide additional details about these errors. This includes native implemented JavaScript errors by Minecraft. |
| 4 | + |
| 5 | +<!-- |
| 6 | + These strings are dumped from quickjs.c (https://github.com/bellard/quickjs/blob/master/quickjs.c) |
| 7 | + then they're verified in Minecraft by checking if the string exist in the game executable. |
| 8 | +--> |
| 9 | + |
| 10 | +### InternalError: string too long |
| 11 | + |
| 12 | +### InternalError: out of memory |
| 13 | + |
| 14 | +- This error occurs when the combined memory usage exceeds 250 megabytes. |
| 15 | +- This saves and shuts down the world by Watchdog termination and cannot be canceled using `BeforeWatchdogTerminateEvent`. |
| 16 | +- The memory limit can be adjusted in `server.properities` by modifying `script-watchdog-memory-limit`. (Setting this value to 0 disables the limit.) |
| 17 | + |
| 18 | +### InternalError: stack overflow |
| 19 | + |
| 20 | +- Occurs when there is a recursive function (a function that calls itself) without an exit point. |
| 21 | + |
| 22 | +- Example code: |
| 23 | + |
| 24 | +```js |
| 25 | +function loop(x) { |
| 26 | + // The base case is missing |
| 27 | + loop(x + 1); // Recursive call |
| 28 | +} |
| 29 | +loop(0); |
| 30 | +// InternalError: stack overflow |
| 31 | +``` |
| 32 | + |
| 33 | +### InternalError: interrupted |
| 34 | + |
| 35 | +### InternalError: invalid index for append |
| 36 | + |
| 37 | +### InternalError: invalid ret value |
| 38 | + |
| 39 | +### InternalError: iterator_close_return |
| 40 | + |
| 41 | +### InternalError: too many local variables |
| 42 | + |
| 43 | +### InternalError: too many arguments |
| 44 | + |
| 45 | +### InternalError: unexpected ellipsis token |
| 46 | + |
| 47 | +### InternalError: too many closure variables |
| 48 | + |
| 49 | +### InternalError: invalid digit |
| 50 | + |
| 51 | +### InternalError: out of memory in regexp execution |
| 52 | + |
| 53 | +### RangeError: invalid array length |
| 54 | +- Occurs when specifying an array length that is either negative, a floating number or exceeds the maximum supported by the platform. [**Source**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length) |
| 55 | + |
| 56 | +### RangeError: invalid array index |
| 57 | + |
| 58 | +### RangeError: radix must be between 2 and 36 |
| 59 | + |
| 60 | +### RangeError: invalid number of digits |
| 61 | + |
| 62 | +### RangeError: invalid code point |
| 63 | + |
| 64 | +### RangeError: invalid repeat count |
| 65 | + |
| 66 | +### RangeError: bad normalization form |
| 67 | + |
| 68 | +### RangeError: Date value is NaN |
| 69 | + |
| 70 | +### RangeError: invalid array buffer length |
| 71 | + |
| 72 | +### RangeError: invalid offset |
| 73 | + |
| 74 | +### RangeError: invalid length |
| 75 | + |
| 76 | +### RangeError: invalid byteOffset |
| 77 | + |
| 78 | +### RangeError: invalid byteLength |
| 79 | + |
| 80 | +### RangeError: out of bound |
| 81 | + |
| 82 | +### ReferenceError: unsupported reference to 'super### ReferenceError: 'this' can be initialized only once |
| 83 | + |
| 84 | +### SyntaxError: unparenthesized unary expression can't appear on the left-hand side of ### SyntaxError: invalid regular expression flags |
| 85 | + |
| 86 | +### TypeError: unsupported operation |
| 87 | + |
| 88 | +### TypeError: invalid object type |
| 89 | + |
| 90 | +### TypeError: not an object |
| 91 | + |
| 92 | +### TypeError: not a symbol |
| 93 | + |
| 94 | +### TypeError: object is not extensible |
| 95 | + |
| 96 | +### TypeError: circular prototype chain |
| 97 | + |
| 98 | +### TypeError: operand 'prototype' property is not an object |
| 99 | + |
| 100 | +### TypeError: invalid 'instanceof' right operand |
| 101 | + |
| 102 | +### TypeError: expecting \<brand> private field |
| 103 | + |
| 104 | +### TypeError: invalid brand on object |
| 105 | + |
| 106 | +### TypeError: no setter for property |
| 107 | + |
| 108 | +### TypeError: could not delete property |
| 109 | + |
| 110 | +### TypeError: toPrimitive |
| 111 | + |
| 112 | +### TypeError: cannot convert symbol to number |
| 113 | + |
| 114 | +### TypeError: cannot convert symbol to string |
| 115 | + |
| 116 | +### TypeError: null or undefined are forbidden |
| 117 | + |
| 118 | +### TypeError: invalid 'in' operand |
| 119 | + |
| 120 | +### TypeError: invalid property access |
| 121 | + |
| 122 | +### TypeError: value is not iterable |
| 123 | + |
| 124 | +### TypeError: iterator must return an object |
| 125 | + |
| 126 | +### TypeError: parent class must be constructor |
| 127 | + |
| 128 | +### TypeError: parent prototype must be an object or null |
| 129 | + |
| 130 | +### TypeError: must be called with new |
| 131 | + |
| 132 | +### TypeError: not a function |
| 133 | + |
| 134 | +### TypeError: derived class constructor must return an object or undefined |
| 135 | + |
| 136 | +### TypeError: class constructors must be invoked with 'new### TypeError: iterator does not have a throw method |
| 137 | + |
| 138 | +### TypeError: value has no property |
| 139 | + |
| 140 | +### TypeError: not a constructor |
| 141 | + |
| 142 | +### TypeError: not a generator |
| 143 | + |
| 144 | +### TypeError: cannot invoke a running generator |
| 145 | + |
| 146 | +### TypeError: not an AsyncGenerator object |
| 147 | + |
| 148 | +### TypeError: import.meta not supported in this context |
| 149 | + |
| 150 | +### TypeError: no function filename for import### TypeError: bytecode function expected |
| 151 | + |
| 152 | +### TypeError: eval is not supported |
| 153 | + |
| 154 | +### TypeError: circular reference |
| 155 | + |
| 156 | +### TypeError: cannot convert to object |
| 157 | + |
| 158 | +### TypeError: invalid getter |
| 159 | + |
| 160 | +### TypeError: invalid setter |
| 161 | + |
| 162 | +### TypeError: cannot have setter/getter and value or writable |
| 163 | + |
| 164 | +### TypeError: not a prototype |
| 165 | + |
| 166 | +### TypeError: proxy preventExtensions handler returned false |
| 167 | + |
| 168 | +### TypeError: not a object |
| 169 | + |
| 170 | +### TypeError: Array loo long |
| 171 | + |
| 172 | +### TypeError: empty array |
| 173 | + |
| 174 | +### TypeError: Array too long |
| 175 | + |
| 176 | +### TypeError: not a number |
| 177 | + |
| 178 | +### TypeError: not a boolean |
| 179 | + |
| 180 | +### TypeError: not a string |
| 181 | + |
| 182 | +### TypeError: regex not supported |
| 183 | + |
| 184 | +### TypeError: regexp must have the 'g' flag |
| 185 | + |
| 186 | +### TypeError: string expected |
| 187 | + |
| 188 | +### TypeError: flags must be undefined |
| 189 | + |
| 190 | +### TypeError: RegExp exec method must return an object or null |
| 191 | + |
| 192 | +### TypeError: revoked proxy |
| 193 | + |
| 194 | +### TypeError: proxy: inconsistent prototype |
| 195 | + |
| 196 | +### TypeError: proxy: bad prototype |
| 197 | + |
| 198 | +### TypeError: proxy: inconsistent isExtensible |
| 199 | + |
| 200 | +### TypeError: proxy: inconsistent preventExtensions |
| 201 | + |
| 202 | +### TypeError: proxy: inconsistent has |
| 203 | + |
| 204 | +### TypeError: proxy: inconsistent get |
| 205 | + |
| 206 | +### TypeError: proxy: inconsistent set |
| 207 | + |
| 208 | +### TypeError: proxy: cannot set property |
| 209 | + |
| 210 | +### TypeError: proxy: inconsistent getOwnPropertyDescriptor |
| 211 | + |
| 212 | +### TypeError: proxy: defineProperty exception |
| 213 | + |
| 214 | +### TypeError: proxy: inconsistent defineProperty |
| 215 | + |
| 216 | +### TypeError: proxy: inconsistent deleteProperty |
| 217 | + |
| 218 | +### TypeError: proxy: properties must be strings or symbols |
| 219 | + |
| 220 | +### TypeError: proxy: duplicate property |
| 221 | + |
| 222 | +### TypeError: proxy: target property must be present in proxy ownKeys |
| 223 | + |
| 224 | +### TypeError: proxy: property not present in target were returned by non extensible proxy |
| 225 | + |
| 226 | +### TypeError: set/add is not a function |
| 227 | + |
| 228 | +### TypeError: promise self resolution |
| 229 | + |
| 230 | +### TypeError: resolving function already set |
| 231 | + |
| 232 | +### TypeError: not an Async-from-Sync Iterator |
| 233 | + |
| 234 | +### TypeError: not a Date object |
| 235 | + |
| 236 | +### TypeError: invalid hint |
| 237 | + |
| 238 | +### TypeError: object needs toISOString method |
| 239 | + |
| 240 | +### TypeError: ArrayBuffer is detached |
| 241 | + |
| 242 | +### TypeError: cannot use identical ArrayBuffer |
| 243 | + |
| 244 | +### TypeError: new ArrayBuffer is too small |
| 245 | + |
| 246 | +### TypeError: TypedArray length is too small |
| 247 | + |
| 248 | +### TypeError: cannot be called |
| 249 | + |
| 250 | +### URIError: expecting %% |
| 251 | + |
| 252 | +### URIError: expecting hex digit |
| 253 | + |
| 254 | +### URIError: malformed UTF-8 |
| 255 | + |
| 256 | +### URIError: invalid character |
| 257 | + |
| 258 | +### URIError: expecting surrogate pair |
0 commit comments