khamba
Version:
A cli tool for sharing files through local network.
16 lines (15 loc) • 484 B
JavaScript
export class CustomError extends Error {
constructor(message, data) {
super(message);
Object.defineProperty(this, "data", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.name = this.constructor.name;
this.data = data;
// This is needed for proper stack trace support in some environments
Error.captureStackTrace(this, this.constructor);
}
}