Uh oh!
There was an error while loading. Please reload this page.
Node source - #48357
Conversation
Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Stevepurpose
commented
Jun 7, 2023
Would have been happier if I could learn why I am wrong by a comment to my PR |
Stevepurpose
commented
Jun 9, 2023
Please how do I go about it,I don't think I have the permissions to do so. |
| However `error.stack` does not work on Microsoft,works only on Firefox . | ||
There was a problem hiding this comment.
I think that's off-topic – this is Node.js docs, we should not document of other runtimes behavior – and also wrong (error.stack is not defined by any standard, however every JS runtime implements it).
| However `error.stack` does not work on Microsoft,works only on Firefox . |
There was a problem hiding this comment.
Ok if that's the standard,but why studying on w3schools it was specified under JavaScript errors ,I thought it was ok mentioning it.One time I tried logging it on my pc on a project tutorial I was following band it just never logged even though it worked on the tutorial video.
| The string representing the stack trace is lazily generated when the | ||
| `error.stack` property is **accessed**. | ||
| `error.stack` property is **accessed**. |
There was a problem hiding this comment.
| `error.stack` property is **accessed**. | |
| `error.stack` property is **accessed**. |
| if (err) { | ||
| console.log(err) | ||
| return | ||
| } |
There was a problem hiding this comment.
If you were to go through the Node js docs Error class ,the section error first callbacks,talks about not throwing errors in error first callbacks,but I also noticed in the documentation it wasn't adhered to in other areas ,so I just changed a few to get a review from the maintainers ,then maybe it can be implemented all through.I think I wrote it in my commit message.
There was a problem hiding this comment.
OK I see where you come from, that Error-first callback section of the docs would need some work as it's quite outdated and not very clear. The important piece of information is here:
Lines 178 to 180 in 7df2758
Crashing the process is what I would want in this case (if the operation fails, I'd expect node to exit with a non-zero exit code); how to handle the error will depend on what your use case is, and I'm not convinced we can document it better.
Stevepurpose
commented
Jun 11, 2023
via email
Ok,I see. …On Sun, 11 Jun 2023, 07:48 Antoine du Hamel, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In doc/api/fs.md
<#48357 (comment)>:
> + if (err) {
+ console.log(err)
+ return
+ }
OK I see where you come from, that Error-first callback
<https://nodejs.org/api/errors.html#error-first-callbacks> section of the
docs would need some work as it's quite outdated and not very clear. The
important piece of information is here:
https://github.com/nodejs/node/blob/7df27582bbb896ebb72697da58209976a0b4daf6/doc/api/errors.md#L178-L180
Crashing the process is what I would want in this case (if the operation
fails, I'd expect node to exit with a non-zero exit code); how to handle
the error will depend on what your use case is, and I'm not convinced we
can document it better.
—
Reply to this email directly, view it on GitHub
<#48357 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZDIFAI65MMWSV7VILCSZMTXKVS2ZANCNFSM6AAAAAAY4GY7PU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi! It's been a few months since any activity on this PR. If you wish to pursue it further, I suggest making sure it is still relevant and getting some reviews from the team. Thanks for your contribution! (CC) @nodejs/documentation |
Stevepurpose
commented
Apr 22, 2024
Thanks for the notification. I thought it has been settled by aduh95 |
Ping @aduh95 This PR, IMO, doesn't seem like it adds to the file, and I don't think it'll do much good being merged. WDYT? |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Closing this because it has stalled. Feel free to reopen if this issue/PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
No description provided.