Title: Fix or Mark apis in the documentation that cannot be try/catch/promised · Issue #8211 · nodejs/node · GitHub
Open Graph Title: Fix or Mark apis in the documentation that cannot be try/catch/promised · Issue #8211 · nodejs/node
X Title: Fix or Mark apis in the documentation that cannot be try/catch/promised · Issue #8211 · nodejs/node
Description: Certain library objects that extend EventEmitter emits error on callback that are not caught by a try/catch or Promise. If it is not possible to address this in code somehow, those objects and methods should be marked in the documentatio...
Open Graph Description: Certain library objects that extend EventEmitter emits error on callback that are not caught by a try/catch or Promise. If it is not possible to address this in code somehow, those objects and meth...
X Description: Certain library objects that extend EventEmitter emits error on callback that are not caught by a try/catch or Promise. If it is not possible to address this in code somehow, those objects and meth...
Opengraph URL: https://github.com/nodejs/node/issues/8211
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix or Mark apis in the documentation that cannot be try/catch/promised","articleBody":"Certain library objects that extend EventEmitter emits error on callback that are not caught by a try/catch or Promise. If it is not possible to address this in code somehow, those objects and methods should be marked in the documentation as requiring an error listener.\n\nIMPACT:\nNode.js throws uncaught exception in edge-case situations\n\nExample 1: failing dns request\n\n``` javascript\nnode --eval \"new Promise(r =\u003e new (require('http').Server)().listen(0, '#$%'))\"\nevents.js:160\n throw er; // Unhandled 'error' event\n ^\n\nError: getaddrinfo ENOTFOUND #$%\n at errnoException (dns.js:28:10)\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:79:26)\n```\n\nExample 2: failed spawn\n\n``` javascript\nnode --eval \"new Promise(r =\u003e require('child_process').spawn('error factory'))\"\nevents.js:160\n throw er; // Unhandled 'error' event\n ^\n\nError: spawn error factory ENOENT\n at exports._errnoException (util.js:1026:11)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)\n at onErrorNT (internal/child_process.js:348:16)\n at _combinedTickCallback (internal/process/next_tick.js:74:11)\n at process._tickCallback (internal/process/next_tick.js:98:9)\n```\n\n\u003e uname --all \u0026\u0026 node --version\n\u003e Linux c89 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux\n\u003e v6.4.0\n","author":{"url":"https://github.com/haraldrudell","@type":"Person","name":"haraldrudell"},"datePublished":"2016-08-21T18:27:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/8211/node/issues/8211"}
| 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:e0bbcf69-7433-c554-4475-86b8e3f36682 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDFA:5D3EF:113BBF8:1708C93:6A4D8E6D |
| html-safe-nonce | 80c7ae4de9a15329a5dcbf136c9f90abea050a0f0a4a8936bfac5a3b1b1d1cb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREZBOjVEM0VGOjExM0JCRjg6MTcwOEM5Mzo2QTREOEU2RCIsInZpc2l0b3JfaWQiOiI0Mzk3NzQ1NDQ4NTY0OTE5OTE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 009efff0ce49c138ff89b8b2d4a1bcf3e2835df8bd28fd768e1c2160271da685 |
| hovercard-subject-tag | issue:172333799 |
| 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/nodejs/node/8211/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1bab8d420e4dd5515535b381a1cd0265f4a1ef5b59c69ff1c8de8c3c244d0f7b/nodejs/node/issues/8211 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1bab8d420e4dd5515535b381a1cd0265f4a1ef5b59c69ff1c8de8c3c244d0f7b/nodejs/node/issues/8211 |
| og:image:alt | Certain library objects that extend EventEmitter emits error on callback that are not caught by a try/catch or Promise. If it is not possible to address this in code somehow, those objects and meth... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | haraldrudell |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| 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 | bffd5484f01713a661b03469b77678f72b6574ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width