mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
Expose POSIX error name as PosixError.code
This matches the behaviour of Node.JS's errors, and some libraries expect it.
This commit is contained in:
parent
8098dc9dcc
commit
c08c8bd073
@ -89,6 +89,7 @@ class PosixError extends Error {
|
||||
|
||||
super(message ?? ErrorMetadata.get(posixCode).description);
|
||||
this.posixCode = posixCode;
|
||||
this.code = posixCode.description;
|
||||
}
|
||||
|
||||
static fromNodeJSError(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user