kerium 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/error.d.ts +2 -2
- package/dist/error.js +2 -1
- package/package.json +1 -1
package/dist/error.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ export declare class ErrnoException extends Error implements NodeJS.ErrnoExcepti
|
|
|
431
431
|
constructor(errno: Errno, message?: string, syscall?: string);
|
|
432
432
|
toString(): string;
|
|
433
433
|
toJSON(): ErrnoExceptionJSON;
|
|
434
|
-
static fromJSON(json: ErrnoExceptionJSON): ErrnoException;
|
|
435
|
-
static With(code: keyof typeof Errno, syscall?: string): ErrnoException;
|
|
434
|
+
static fromJSON(this: void, json: ErrnoExceptionJSON): ErrnoException;
|
|
435
|
+
static With(this: void, code: keyof typeof Errno, syscall?: string): ErrnoException;
|
|
436
436
|
}
|
|
437
437
|
export {};
|
package/dist/error.js
CHANGED
|
@@ -443,11 +443,12 @@ export class ErrnoException extends Error {
|
|
|
443
443
|
const err = new ErrnoException(json.errno, json.message, json.syscall);
|
|
444
444
|
err.code = json.code;
|
|
445
445
|
err.stack = json.stack;
|
|
446
|
+
Error.captureStackTrace?.(err, ErrnoException.fromJSON);
|
|
446
447
|
return err;
|
|
447
448
|
}
|
|
448
449
|
static With(code, syscall) {
|
|
449
450
|
const err = new ErrnoException(Errno[code], errnoMessages[Errno[code]], syscall);
|
|
450
|
-
Error.captureStackTrace?.(err,
|
|
451
|
+
Error.captureStackTrace?.(err, ErrnoException.With);
|
|
451
452
|
return err;
|
|
452
453
|
}
|
|
453
454
|
}
|