@@ -323,21 +323,22 @@ function makeFaster() {
323
323
});
324
324
}
325
325
326
- makeFaster (); // will throw:
327
- // /home/gbusey/file.js:6
328
- // throw new Error('oh no!');
329
- // ^
330
- // Error: oh no!
331
- // at speedy (/home/gbusey/file.js:6:11)
332
- // at makeFaster (/home/gbusey/file.js:5:3)
333
- // at Object.<anonymous> (/home/gbusey/file.js:10:1)
334
- // at Module._compile (module.js:456:26)
335
- // at Object.Module._extensions..js (module.js:474:10)
336
- // at Module.load (module.js:356:32)
337
- // at Function.Module._load (module.js:312:12)
338
- // at Function.Module.runMain (module.js:497:10)
339
- // at startup (node.js:119:16)
340
- // at node.js:906:3
326
+ makeFaster ();
327
+ // will throw:
328
+ // /home/gbusey/file.js:6
329
+ // throw new Error('oh no!');
330
+ // ^
331
+ // Error: oh no!
332
+ // at speedy (/home/gbusey/file.js:6:11)
333
+ // at makeFaster (/home/gbusey/file.js:5:3)
334
+ // at Object.<anonymous> (/home/gbusey/file.js:10:1)
335
+ // at Module._compile (module.js:456:26)
336
+ // at Object.Module._extensions..js (module.js:474:10)
337
+ // at Module.load (module.js:356:32)
338
+ // at Function.Module._load (module.js:312:12)
339
+ // at Function.Module.runMain (module.js:497:10)
340
+ // at startup (node.js:119:16)
341
+ // at node.js:906:3
341
342
```
342
343
343
344
The location information will be one of:
@@ -368,7 +369,7 @@ For example:
368
369
369
370
``` js
370
371
require (' net' ).connect (- 1 );
371
- // throws "RangeError: "port" option should be >= 0 and < 65536: -1"
372
+ // throws "RangeError: "port" option should be >= 0 and < 65536: -1"
372
373
```
373
374
374
375
Node.js will generate and throw ` RangeError ` instances * immediately* as a form
@@ -385,7 +386,7 @@ will do so.
385
386
386
387
``` js
387
388
doesNotExist;
388
- // throws ReferenceError, doesNotExist is not a variable in this program.
389
+ // throws ReferenceError, doesNotExist is not a variable in this program.
389
390
```
390
391
391
392
Unless an application is dynamically generating and running code,
@@ -419,7 +420,7 @@ string would be considered a TypeError.
419
420
420
421
``` js
421
422
require (' url' ).parse (() => { });
422
- // throws TypeError, since it expected a string
423
+ // throws TypeError, since it expected a string
423
424
```
424
425
425
426
Node.js will generate and throw ` TypeError ` instances * immediately* as a form
@@ -640,7 +641,7 @@ const urlSearchParams = new URLSearchParams('foo=bar&baz=new');
640
641
641
642
const buf = Buffer .alloc (1 );
642
643
urlSearchParams .has .call (buf, ' foo' );
643
- // Throws a TypeError with code 'ERR_INVALID_THIS'
644
+ // Throws a TypeError with code 'ERR_INVALID_THIS'
644
645
```
645
646
646
647
<a id =" ERR_INVALID_TUPLE " ></a >
0 commit comments