-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] [test] Check Error stack for **all** node builtin #49045
Comments
/cc @nodejs/fs
AFAIK there's no spec regarding error stack traces, it's at best a convention, a common case would be a more precise way to put it.
Isn't that more than just related? It looks like a duplicate to me. What's the difference between the two issues? |
The spec should describe such import thing for debug, else, very hard to figure out where goes wrong. 😢
|
This is specifically an issue with promise rejected from C++ land, so it's a duplicate of #30944 - the JS spec can't do anything with it, the fact that a JS land |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
Oh dang
…On Mon, Feb 5, 2024 at 5:25 PM github-actions[bot] ***@***.***> wrote:
There has been no activity on this feature request for 5 months and it is
unlikely to be implemented. It will be closed 6 months after the last
non-automated comment.
For more information on how the project manages feature requests, please
consult the feature request management document
<https://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md>
.
—
Reply to this email directly, view it on GitHub
<#49045 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7QBBDGMAKY62G52LFRWGIDYSGBA5AVCNFSM6AAAAAA3GBA5LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYGYYDGOBYGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Closed in duplicated of #30944. |
Search Keyword
Errors without stack trace
swallow error stack trace
no stack trace
incomplete stack trace
stack trace without script itself
What is the problem this feature will solve?
Actual
Error stack not includes
/tmp/reproduce/reproduce.mjs
node:internal/process/esm_loader:46 internalBinding('errors').triggerUncaughtException( ^ [Error: ENOENT: no such file or directory, open '/tmp/notexists'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/tmp/notexists' } Node.js v20.4.0
Expected
Error stack includes
/tmp/reproduce/reproduce.mjs
node:fs:593 handleErrorFromBinding(ctx); ^ Error: ENOENT: no such file or directory, open '/tmp/notexists' at Object.openSync (node:fs:593:3) at readFileSync (node:fs:461:35) at file:///tmp/reproduce/reproduce.mjs:3:7 at ModuleJob.run (node:internal/modules/esm/module_job:192:25) at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24) at async loadESM (node:internal/process/esm_loader:40:7) at async handleMainPromise (node:internal/modules/run_main:66:12) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/tmp/notexists' } Node.js v20.4.0
What is the feature you are proposing to solve the problem?
Given script
/tmp/reproduce/reproduce.mjs
.If it throw, expect its error stack should includes
/tmp/reproduce/reproduce.mjs
However, seems some node functions not obey that.
Some thoughts.
Is there a full list of these kind of function, which need to be careful?
Would be nice to have test to check error stack include the script itself.
Expect error stack include script itself. Is this by spec? Or is it a convention? Or neither, just a very common case?
What alternatives have you considered?
No response
Related
#30944
The text was updated successfully, but these errors were encountered: