Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: document --abort-on-uncaught-exception #13931

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ added: v8.0.0
Enable loading native modules compiled with the ABI-stable Node.js API (N-API)
(experimental).

## `--abort-on-uncaught-exception`
<!-- YAML
added: v0.10
-->

Aborting instead of exiting causes a core file to be generated for post-mortem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion (feel free to take it or ignore it):

Abort the process and generate a core file if an uncaught exception occurs. The core file can be used for post-mortem analysis using a debugger such as lldb, gdb, and mdb.

analysis using a debugger (such as `lldb`, `gdb`, and `mdb`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this dependent on system settings, e.g. ulimit -c on Linux?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By 'this' I mean the generation of a core file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, should I give some advice here on ulimit, or just say that it may generate a core file?


### `--trace-warnings`
<!-- YAML
added: v6.0.0
Expand Down
4 changes: 4 additions & 0 deletions doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ Silence all process warnings (including deprecations).
Enable loading native modules compiled with the ABI-stable Node.js API (N-API)
(experimental).

.TP
.BR \-\-abort\-on\-uncaught\-exception
Aborting instead of exiting causes a core file to be generated for analysis.

.TP
.BR \-\-trace\-warnings
Print stack traces for process warnings (including deprecations).
Expand Down
3 changes: 3 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3645,6 +3645,9 @@ static void PrintHelp() {
" --pending-deprecation emit pending deprecation warnings\n"
" --no-warnings silence all process warnings\n"
" --napi-modules load N-API modules\n"
" --abort-on-uncaught-exception\n"
" aborting instead of exiting causes a\n"
" core file to be generated for analysis\n"
" --trace-warnings show stack traces on process warnings\n"
" --redirect-warnings=file\n"
" write warnings to file instead of\n"
Expand Down