-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Many times when a function throws an exception, the exception's syscall and path are set to values passed to a failing function call. For example (simplified):
function mkdir(path) {
try {
const parent = stat(parentPath)
} catch {
throw ExceptionWith('stat', parentPath)
}
}The problem is that POSIX platforms don't do this. if you mkdir x/y/z and y doesn't exist, the error is ENOENT: mkdir x/y/z not ENOENT: stat x/y. This needs to be fixed.