GeezerVison is showing github.com — errors: disp ver on fatal except that causes exit · fredericp/node@59d3d54
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Expand file Copy file name to clipboardExpand all lines: doc/api/cli.md +8Lines changed: 8 additions & 0 deletions - Display the source diff
- Display the rich diff
Collapse file Copy file name to clipboardExpand all lines: doc/node.1 +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -273,6 +273,9 @@ It is kept for compatibility. | 273 | 273 | .It Fl -no-deprecation | 274 | 274 | Silence deprecation warnings. | 275 | 275 | . | | 276 | +.It Fl -no-extra-info-on-fatal-exception | | 277 | +Hide extra information on fatal exception that causes exit. | | 278 | +. | 276 | 279 | .It Fl -no-force-async-hooks-checks | 277 | 280 | Disable runtime checks for `async_hooks`. | 278 | 281 | These will still be enabled dynamically when `async_hooks` is enabled. | |
Collapse file Copy file name to clipboardExpand all lines: src/node_errors.cc +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -414,6 +414,10 @@ static void ReportFatalException(Environment* env, | 414 | 414 | } | 415 | 415 | } | 416 | 416 |
| | 417 | + if (env->options()->extra_info_on_fatal_exception) { | | 418 | + FPrintF(stderr, "\nNode.js %s\n", NODE_VERSION); | | 419 | + } | | 420 | + | 417 | 421 | fflush(stderr); | 418 | 422 | } | 419 | 423 |
| |
Collapse file Copy file name to clipboardExpand all lines: src/node_options.cc +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -511,6 +511,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | 511 | 511 | "show stack traces on process warnings", | 512 | 512 | &EnvironmentOptions::trace_warnings, | 513 | 513 | kAllowedInEnvironment); | | 514 | + AddOption("--extra-info-on-fatal-exception", | | 515 | + "hide extra information on fatal exception that causes exit", | | 516 | + &EnvironmentOptions::extra_info_on_fatal_exception, | | 517 | + kAllowedInEnvironment, | | 518 | + true); | 514 | 519 | AddOption("--unhandled-rejections", | 515 | 520 | "define unhandled rejections behavior. Options are 'strict' " | 516 | 521 | "(always raise an error), 'throw' (raise an error unless " | |
Collapse file Copy file name to clipboardExpand all lines: src/node_options.h +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -150,6 +150,7 @@ class EnvironmentOptions : public Options { | 150 | 150 | bool trace_tls = false; | 151 | 151 | bool trace_uncaught = false; | 152 | 152 | bool trace_warnings = false; | | 153 | + bool extra_info_on_fatal_exception = true; | 153 | 154 | std::string unhandled_rejections; | 154 | 155 | std::string userland_loader; | 155 | 156 | bool verify_base_objects = | |
Collapse file Copy file name to clipboardExpand all lines: test/message/assert_throws_stack.out +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,3 +32,5 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: | 32 | 32 | expected: { bar: true }, | 33 | 33 | operator: 'throws' | 34 | 34 | } | | 35 | + | | 36 | +Node.js * |
Collapse file Copy file name to clipboardExpand all lines: test/message/core_line_numbers.out +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,3 +12,5 @@ RangeError: Invalid input | 12 | 12 | at Function.Module._load (node:internal/modules/cjs/loader:*:*) | 13 | 13 | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*) | 14 | 14 | at node:internal/main/run_main_module:*:* | | 15 | + | | 16 | +Node.js * |
Collapse file Copy file name to clipboardExpand all lines: test/message/error_aggregateTwoErrors.out +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,3 +11,5 @@ AggregateError: original | 11 | 11 | at node:internal/main/run_main_module:*:* { | 12 | 12 | code: 'ERR0' | 13 | 13 | } | | 14 | + | | 15 | +Node.js * |
Collapse file Copy file name to clipboardExpand all lines: test/message/error_exit.out +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -20,3 +20,5 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: | 20 | 20 | expected: 2, | 21 | 21 | operator: 'strictEqual' | 22 | 22 | } | | 23 | + | | 24 | +Node.js * |
Collapse file Copy file name to clipboard
|