@@ -316,20 +316,20 @@ function makeFaster() {
316
316
}
317
317
318
318
makeFaster (); // will throw:
319
- // /home/gbusey/file.js:6
320
- // throw new Error('oh no!');
321
- // ^
322
- // Error: oh no!
323
- // at speedy (/home/gbusey/file.js:6:11)
324
- // at makeFaster (/home/gbusey/file.js:5:3)
325
- // at Object.<anonymous> (/home/gbusey/file.js:10:1)
326
- // at Module._compile (module.js:456:26)
327
- // at Object.Module._extensions..js (module.js:474:10)
328
- // at Module.load (module.js:356:32)
329
- // at Function.Module._load (module.js:312:12)
330
- // at Function.Module.runMain (module.js:497:10)
331
- // at startup (node.js:119:16)
332
- // at node.js:906:3
319
+ // /home/gbusey/file.js:6
320
+ // throw new Error('oh no!');
321
+ // ^
322
+ // Error: oh no!
323
+ // at speedy (/home/gbusey/file.js:6:11)
324
+ // at makeFaster (/home/gbusey/file.js:5:3)
325
+ // at Object.<anonymous> (/home/gbusey/file.js:10:1)
326
+ // at Module._compile (module.js:456:26)
327
+ // at Object.Module._extensions..js (module.js:474:10)
328
+ // at Module.load (module.js:356:32)
329
+ // at Function.Module._load (module.js:312:12)
330
+ // at Function.Module.runMain (module.js:497:10)
331
+ // at startup (node.js:119:16)
332
+ // at node.js:906:3
333
333
```
334
334
335
335
The location information will be one of:
@@ -360,7 +360,7 @@ For example:
360
360
361
361
``` js
362
362
require (' net' ).connect (- 1 );
363
- // throws "RangeError: "port" option should be >= 0 and < 65536: -1"
363
+ // throws "RangeError: "port" option should be >= 0 and < 65536: -1"
364
364
```
365
365
366
366
Node.js will generate and throw ` RangeError ` instances * immediately* as a form
@@ -377,7 +377,7 @@ will do so.
377
377
378
378
``` js
379
379
doesNotExist;
380
- // throws ReferenceError, doesNotExist is not a variable in this program.
380
+ // throws ReferenceError, doesNotExist is not a variable in this program.
381
381
```
382
382
383
383
Unless an application is dynamically generating and running code,
@@ -411,7 +411,7 @@ string would be considered a TypeError.
411
411
412
412
``` js
413
413
require (' url' ).parse (() => { });
414
- // throws TypeError, since it expected a string
414
+ // throws TypeError, since it expected a string
415
415
```
416
416
417
417
Node.js will generate and throw ` TypeError ` instances * immediately* as a form
0 commit comments