kerium 1.2.0 → 1.2.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 +1 -1
- package/dist/error.js +1 -1
- package/package.json +1 -1
package/dist/error.d.ts
CHANGED
|
@@ -436,5 +436,5 @@ export declare class ErrnoException extends Error implements NodeJS.ErrnoExcepti
|
|
|
436
436
|
/**
|
|
437
437
|
* Shortcut to easily create an `ErrnoException` with a specific error code.
|
|
438
438
|
*/
|
|
439
|
-
export declare function withErrno(this: void, code: keyof typeof Errno,
|
|
439
|
+
export declare function withErrno(this: void, code: keyof typeof Errno, message?: string, syscall?: string): ErrnoException;
|
|
440
440
|
export {};
|
package/dist/error.js
CHANGED
|
@@ -449,7 +449,7 @@ export class ErrnoException extends Error {
|
|
|
449
449
|
/**
|
|
450
450
|
* Shortcut to easily create an `ErrnoException` with a specific error code.
|
|
451
451
|
*/
|
|
452
|
-
export function withErrno(code,
|
|
452
|
+
export function withErrno(code, message, syscall) {
|
|
453
453
|
const err = new ErrnoException(Errno[code], message ?? errnoMessages[Errno[code]], syscall);
|
|
454
454
|
Error.captureStackTrace?.(err, withErrno);
|
|
455
455
|
return err;
|