Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Fix return code from uncaught exception handler #70

Closed
wants to merge 1 commit into from
Closed

Fix return code from uncaught exception handler #70

wants to merge 1 commit into from

Conversation

rnchamberlain
Copy link
Contributor

On node 4 or 6, the uncaught exception handler produces a report then prints a stack trace OK, but node continues to run when the handler function returns. The expected behavior on uncaught exception is to exit with rc=1. This PR fixes the handler to exit with return code = 1, also fixes the corresponding testcase.

Fixes #6

CI: https://ci.nodejs.org/view/post-mortem/job/nodereport-continuous-integration/118/

When running on on node 4 and 6, with node-report enabled, the uncaught
exception handler produces a report then prints a stack trace, but node
continues rather than exiting with rc=1. Fix return code and testcase.
@sam-github
Copy link
Contributor

LGTM

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

LGTM

Expected exit codes for Node.js are documented: https://nodejs.org/dist/latest-v6.x/docs/api/process.html#process_exit_codes

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

rnchamberlain added a commit that referenced this pull request Mar 16, 2017
When running on on node 4 and 6, with node-report enabled, the uncaught
exception handler produces a report then prints a stack trace, but node
continues rather than exiting with rc=1. Fix return code and testcase.

PR-URL: #70
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@rnchamberlain
Copy link
Contributor Author

Landed as fe6cce6

@rnchamberlain rnchamberlain deleted the exception-return branch April 7, 2017 11:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

illegal hardware exception
5 participants