UNPKG

@necto-ai/pgit

Version:

Private file tracking with dual git repositories

35 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseError = void 0; /** * Base error class for all private git CLI errors */ class BaseError extends Error { constructor(message, // eslint-disable-next-line no-unused-vars details) { super(message); this.details = details; this.name = this.constructor.name; // Maintains proper stack trace for where our error was thrown (only available on V8) if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } } /** * Convert error to JSON representation */ toJSON() { return { error: true, name: this.name, code: this.code, message: this.message, details: this.details, recoverable: this.recoverable, stack: this.stack, }; } } exports.BaseError = BaseError; //# sourceMappingURL=base.error.js.map