@@ -180,7 +180,7 @@ cases. If [domains][] are enabled, or a handler has been registered with
180
180
181
181
<!-- type=class-->
182
182
183
- A generic JavaScript ` Error ` object that does not denote any specific
183
+ A generic JavaScript { Error} object that does not denote any specific
184
184
circumstance of why the error occurred. ` Error ` objects capture a "stack trace"
185
185
detailing the point in the code at which the ` Error ` was instantiated, and may
186
186
provide a text description of the error.
@@ -352,14 +352,18 @@ loop tick.
352
352
353
353
## Class: AssertionError
354
354
355
- A subclass of ` Error ` that indicates the failure of an assertion. For details,
356
- see [ ` Class: assert.AssertionError ` ] [ ] .
355
+ * Extends: {errors.Error}
356
+
357
+ Indicates the failure of an assertion. For details, see
358
+ [ ` Class: assert.AssertionError ` ] [ ] .
357
359
358
360
## Class: RangeError
359
361
360
- A subclass of ` Error ` that indicates that a provided argument was not within the
361
- set or range of acceptable values for a function; whether that is a numeric
362
- range, or outside the set of options for a given function parameter.
362
+ * Extends: {errors.Error}
363
+
364
+ Indicates that a provided argument was not within the set or range of
365
+ acceptable values for a function; whether that is a numeric range, or
366
+ outside the set of options for a given function parameter.
363
367
364
368
``` js
365
369
require (' net' ).connect (- 1 );
@@ -371,9 +375,11 @@ of argument validation.
371
375
372
376
## Class: ReferenceError
373
377
374
- A subclass of ` Error ` that indicates that an attempt is being made to access a
375
- variable that is not defined. Such errors commonly indicate typos in code, or
376
- an otherwise broken program.
378
+ * Extends: {errors.Error}
379
+
380
+ Indicates that an attempt is being made to access a variable that is not
381
+ defined. Such errors commonly indicate typos in code, or an otherwise broken
382
+ program.
377
383
378
384
While client code may generate and propagate these errors, in practice, only V8
379
385
will do so.
@@ -389,11 +395,12 @@ or its dependencies.
389
395
390
396
## Class: SyntaxError
391
397
392
- A subclass of ` Error ` that indicates that a program is not valid JavaScript.
393
- These errors may only be generated and propagated as a result of code
394
- evaluation. Code evaluation may happen as a result of ` eval ` , ` Function ` ,
395
- ` require ` , or [ vm] [ ] . These errors are almost always indicative of a broken
396
- program.
398
+ * Extends: {errors.Error}
399
+
400
+ Indicates that a program is not valid JavaScript. These errors may only be
401
+ generated and propagated as a result of code evaluation. Code evaluation may
402
+ happen as a result of ` eval ` , ` Function ` , ` require ` , or [ vm] [ ] . These errors
403
+ are almost always indicative of a broken program.
397
404
398
405
``` js
399
406
try {
@@ -408,6 +415,8 @@ they may only be caught by other contexts.
408
415
409
416
## Class: SystemError
410
417
418
+ * Extends: {errors.Error}
419
+
411
420
Node.js generates system errors when exceptions occur within its runtime
412
421
environment. These usually occur when an application violates an operating
413
422
system constraint. For example, a system error will occur if an application
@@ -548,9 +557,11 @@ program. For a comprehensive list, see the [`errno`(3) man page][].
548
557
549
558
## Class: TypeError
550
559
551
- A subclass of ` Error ` that indicates that a provided argument is not an
552
- allowable type. For example, passing a function to a parameter which expects a
553
- string would be considered a ` TypeError ` .
560
+ * Extends {errors.Error}
561
+
562
+ Indicates that a provided argument is not an allowable type. For example,
563
+ passing a function to a parameter which expects a string would be considered
564
+ a ` TypeError ` .
554
565
555
566
``` js
556
567
require (' url' ).parse (() => { });
0 commit comments