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
Backport-PR-URL: #51127
Fixes: #50160
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • Loading branch information
sapphi-red authored and marco-ippolito committed Apr 29, 2024
1 parent d5ac979 commit c530520
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 90 deletions.

0 comments on commit c530520

Please sign in to comment.