Skip to content

Commit

Permalink
fs: add stacktrace to fs/promises
Browse files Browse the repository at this point in the history
Sync functions in fs throwed an error with a stacktrace which is helpful
for debugging. But functions in fs/promises throwed an error without
a stacktrace. This commit adds stacktraces by calling
Error.captureStacktrace and re-throwing the error.

Refs: #34817
PR-URL: #49849
Fixes: #50160
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
sapphi-red authored and targos committed Nov 11, 2023
1 parent 67cbe1b commit 7e15111
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 90 deletions.
Loading

0 comments on commit 7e15111

Please sign in to comment.