From aa8078b6888ee4d55ef348e336e076676dffc25f Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Mon, 31 Jul 2023 22:29:09 +0200 Subject: feat(node/os): implement getPriority, setPriority & userInfo (#19370) Takes #4202 over Closes #17850 --------- Co-authored-by: ecyrbe --- ext/node/polyfills/internal/errors.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ext/node/polyfills/internal') diff --git a/ext/node/polyfills/internal/errors.ts b/ext/node/polyfills/internal/errors.ts index 55098d79b..2ba7ec28e 100644 --- a/ext/node/polyfills/internal/errors.ts +++ b/ext/node/polyfills/internal/errors.ts @@ -2497,6 +2497,19 @@ export class ERR_FS_RMDIR_ENOTDIR extends NodeSystemError { } } +export class ERR_OS_NO_HOMEDIR extends NodeSystemError { + constructor() { + const code = isWindows ? "ENOENT" : "ENOTDIR"; + const ctx: NodeSystemErrorCtx = { + message: "not a directory", + syscall: "home", + code, + errno: isWindows ? osConstants.errno.ENOENT : osConstants.errno.ENOTDIR, + }; + super(code, ctx, "Path is not a directory"); + } +} + interface UvExceptionContext { syscall: string; path?: string; -- cgit v1.2.3