UNPKG

pgit-cli

Version:

Private file tracking with dual git repositories

88 lines 2.46 kB
import { BaseError } from './base.error.js'; /** * Git repository related errors */ export class GitError extends BaseError { constructor() { super(...arguments); this.code = 'GIT_ERROR'; this.recoverable = true; } } /** * Repository not found errors */ export class RepositoryNotFoundError extends BaseError { constructor() { super(...arguments); this.code = 'REPOSITORY_NOT_FOUND'; this.recoverable = false; } } /** * Git operation failed errors */ export class GitOperationError extends BaseError { constructor() { super(...arguments); this.code = 'GIT_OPERATION_FAILED'; this.recoverable = true; } } /** * Repository corruption errors */ export class RepositoryCorruptionError extends BaseError { constructor() { super(...arguments); this.code = 'REPOSITORY_CORRUPTION'; this.recoverable = false; } } /** * Git index errors */ export class GitIndexError extends BaseError { constructor() { super(...arguments); this.code = 'GIT_INDEX_ERROR'; this.recoverable = true; } } /** * Git exclude file operation errors */ export class GitExcludeError extends BaseError { constructor(message, operation, affectedPaths = [], cause, code = 'GIT_EXCLUDE_ERROR', recoverable = true) { super(message, cause); this.operation = operation; this.affectedPaths = affectedPaths; this.code = code; this.recoverable = recoverable; } } /** * Git exclude file access errors (permissions, file system issues) */ export class GitExcludeAccessError extends GitExcludeError { constructor(message, operation, affectedPaths = [], cause) { super(message, operation, affectedPaths, cause, 'GIT_EXCLUDE_ACCESS_ERROR', false); } } /** * Git exclude file corruption errors */ export class GitExcludeCorruptionError extends GitExcludeError { constructor(message, operation, affectedPaths = [], cause) { super(message, operation, affectedPaths, cause, 'GIT_EXCLUDE_CORRUPTION_ERROR', true); } } /** * Git exclude validation errors (invalid paths, duplicate entries) */ export class GitExcludeValidationError extends GitExcludeError { constructor(message, operation, affectedPaths = [], cause) { super(message, operation, affectedPaths, cause, 'GIT_EXCLUDE_VALIDATION_ERROR', true); } } //# sourceMappingURL=git.error.js.map