Title: Rethink unhandled exception handling · Issue #14 · cspotcode/node-source-map-support · GitHub
Open Graph Title: Rethink unhandled exception handling · Issue #14 · cspotcode/node-source-map-support
X Title: Rethink unhandled exception handling · Issue #14 · cspotcode/node-source-map-support
Description: Monkey-patch process._fatalException? process.on('uncaughtExceptionMonitor') https://nodejs.org/api/process.html#process_event_uncaughtexceptionmonitor Do we need to detect unhandledRejection, too? Looks like C++ starts the process of tr...
Open Graph Description: Monkey-patch process._fatalException? process.on('uncaughtExceptionMonitor') https://nodejs.org/api/process.html#process_event_uncaughtexceptionmonitor Do we need to detect unhandledRejection, too?...
X Description: Monkey-patch process._fatalException? process.on('uncaughtExceptionMonitor') https://nodejs.org/api/process.html#process_event_uncaughtexceptionmonitor Do we need to detect unhandledRejecti...
Opengraph URL: https://github.com/cspotcode/node-source-map-support/issues/14
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rethink unhandled exception handling","articleBody":"Monkey-patch `process._fatalException`?\r\n`process.on('uncaughtExceptionMonitor'`) https://nodejs.org/api/process.html#process_event_uncaughtexceptionmonitor\r\n\r\nDo we need to detect `unhandledRejection`, too?\r\n\r\nLooks like C++ starts the process of triggering and (possibly) dying from an unhandled exception:\r\nhttps://github.com/nodejs/node/blob/65234bbce024dec9d5490b17137abe381a979a28/src/node_errors.cc#L926-L1018\r\n\r\nThis JS code -- \"global uncaught exception handler\" -- receives fatal exceptions and fires the process events:\r\nhttps://github.com/nodejs/node/blob/55745a1817152629ad492e9b8dd1e3bca49686b7/lib/internal/process/execution.js#L130-L201\r\n\r\nThis C++ reports fatal exceptions once it is clear that the exception is, indeed, fatal / unhandled.\r\nhttps://github.com/nodejs/node/blob/65234bbce024dec9d5490b17137abe381a979a28/src/node_errors.cc#L280-L418\r\n\r\nThis issue talks a bit about the hidden private symbol upon which the \"arrow message\" is stored. \"Arrow message\" is the prefix with a caret pointing to the exact position in the code where the error occurred.\r\n```\r\nhttps://github.com/nodejs/node/issues/4835\r\n```\r\n\r\nnode's internal JS has a `setArrowMessage` function which can set this message:\r\nUsed here: https://github.com/nodejs/node/blob/e2a6399be742f53103474d9fc1e56fadf7f90ccc/lib/internal/modules/cjs/loader.js#L1146\r\n\r\nIf the line includes this directive, node does not include certain info:\r\n```\r\nthrow e; /* node-do-not-add-exception-line */\r\n```\r\n","author":{"url":"https://github.com/cspotcode","@type":"Person","name":"cspotcode"},"datePublished":"2021-07-21T04:22:39Z","url":"https://github.com/cspotcode/node-source-map-support/issues/14"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:235b88b4-3947-5881-3f31-675d6662a3ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD8A:3988A1:12E1136:19DB3D5:6AFB71A0 |
| html-safe-nonce | df46f2264838384a1c48dac4f37183a0fa1fd46d238bdddf19884b17395c2fcb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDhBOjM5ODhBMToxMkUxMTM2OjE5REIzRDU6NkFGQjcxQTAiLCJ2aXNpdG9yX2lkIjoiNDE3NzQyMjU1NTUyODUyNDE5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4ff78a56ab26111417a2f6d99d80a5958dba87f41969accb38ea04768e8efe3d |
| hovercard-subject-tag | issue:949308723 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cspotcode/node-source-map-support/14/issue_layout |
| twitter:image | https://opengraph.githubassets.com/84849fcb902c4fa4ce8d0dae9689c64993eb1c74ef4e2f4a4c3ccadbb7861198/cspotcode/node-source-map-support/issues/14 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/84849fcb902c4fa4ce8d0dae9689c64993eb1c74ef4e2f4a4c3ccadbb7861198/cspotcode/node-source-map-support/issues/14 |
| og:image:alt | Monkey-patch process._fatalException? process.on('uncaughtExceptionMonitor') https://nodejs.org/api/process.html#process_event_uncaughtexceptionmonitor Do we need to detect unhandledRejection, too?... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cspotcode |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48 |
| turbo-cache-control | no-preview |
| go-import | github.com/cspotcode/node-source-map-support git https://github.com/cspotcode/node-source-map-support.git |
| octolytics-dimension-user_id | 376504 |
| octolytics-dimension-user_login | cspotcode |
| octolytics-dimension-repository_id | 310942201 |
| octolytics-dimension-repository_nwo | cspotcode/node-source-map-support |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 310942201 |
| octolytics-dimension-repository_network_root_nwo | cspotcode/node-source-map-support |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2e8872b770cc4d5d0cc1f2026afab747a268e2ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width