Improve the error message from stat/statSync
#10553
Labels
Comments
|
Pull request welcome! The error message is bubbled up straight from the Rust runtime. The relevant code is here: Lines 846 to 850 in 1cd1419 It's possible to remap the error message to include the filename but it should be done in a principled manner, i.e., for more than just stat. With ops that operate on more than one path (like link) you don't know which path is the problematic one. I'd include both in the error message, that's what Node does. |
|
Is this ok or not? @bnoordhuis |
|
@CGQAQ if you are not working on this, can I take this up? |
|
Sure
获取 Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
发件人: Kannav Mehta ***@***.***>
发送时间: Wednesday, June 30, 2021 1:18:07 AM
收件人: denoland/deno ***@***.***>
抄送: CGQAQ ***@***.***>; Mention ***@***.***>
主题: Re: [denoland/deno] Improve the error message from `stat/statSync` (#10553)
@CGQAQ<https://github.com/CGQAQ> if you are not working on this, can I take this up?
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#10553 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADZSVZZR3X5LSRSBGCUY22DTVH547ANCNFSM44QXFH3Q>.
|
|
Is this PR still available? |
|
Sure. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Currently the error message of the exception, thrown from the
Deno.stat/statSync, when the file is missing, does not include the file name:Is this intentional with some rationale behind, or just an oversight? From usability perspective the filename should be included in the message of course.
The text was updated successfully, but these errors were encountered: