| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -462,6 +462,29 @@ The `*-deprecation` command-line flags only affect warnings that use the name | |||
| 462 | 462 | See the [`process.emitWarning()`][process_emit_warning] method for issuing | |
| 463 | 463 | custom or application-specific warnings. | |
| 464 | 464 | ||
| 465 | + #### Node.js warning names | ||
| 466 | + | ||
| 467 | + There are no strict guidelines for warning types (as identified by the `name` | ||
| 468 | + property) emitted by Node.js. New types of warnings can be added at any time. | ||
| 469 | + A few of the warning types that are most common include: | ||
| 470 | + | ||
| 471 | + * `'DeprecationWarning'` - Indicates use of a deprecated Node.js API or feature. | ||
| 472 | + Such warnings must include a `'code'` property identifying the | ||
| 473 | + [deprecation code][]. | ||
| 474 | + * `'ExperimentalWarning'` - Indicates use of an experimental Node.js API or | ||
| 475 | + feature. Such features must be used with caution as they may change at any | ||
| 476 | + time and are not subject to the same strict semantic-versioning and long-term | ||
| 477 | + support policies as supported features. | ||
| 478 | + * `'MaxListenersExceededWarning'` - Indicates that too many listeners for a | ||
| 479 | + given event have been registered on either an `EventEmitter` or `EventTarget`. | ||
| 480 | + This is often an indication of a memory leak. | ||
| 481 | + * `'TimeoutOverflowWarning'` - Indicates that a numeric value that cannot fit | ||
| 482 | + within a 32-bit signed integer has been provided to either the `setTimeout()` | ||
| 483 | + or `setInterval()` functions. | ||
| 484 | + * `'UnsupportedWarning'` - Indicates use of an unsupported option or feature | ||
| 485 | + that will be ignored rather than treated as an error. One example is use of | ||
| 486 | + the HTTP response status message when using the HTTP/2 compatibility API. | ||
| 487 | + | ||
| 465 | 488 | ### Signal events | |
| 466 | 489 | ||
| 467 | 490 | <!--type=event--> | |
@@ -2698,6 +2721,7 @@ cases: | |||
| 2698 | 2721 | [`subprocess.kill()`]: child_process.md#child_process_subprocess_kill_signal | |
| 2699 | 2722 | [`v8.setFlagsFromString()`]: v8.md#v8_v8_setflagsfromstring_flags | |
| 2700 | 2723 | [debugger]: debugger.md | |
| 2724 | + [deprecation code]: deprecations.md | ||
| 2701 | 2725 | [note on process I/O]: process.md#process_a_note_on_process_i_o | |
| 2702 | 2726 | [process.cpuUsage]: #process_process_cpuusage_previousvalue | |
| 2703 | 2727 | [process_emit_warning]: #process_process_emitwarning_warning_type_code_ctor | |
| Back | FazBrowse Home | New Git URL |
0 commit comments