/** * Base Domain Error * All domain-specific errors should extend this class * Provides error codes for programmatic handling */ export declare enum DomainErrorCode { INVALID_BRANCH_NAME = "DOM_1001", INVALID_CONFIGURATION = "DOM_1002", INVALID_FILE_PATH = "DOM_1003", VALIDATION_FAILED = "DOM_1004", CHECK_VIOLATION = "DOM_2001", CHECK_EXECUTION_FAILED = "DOM_2002", PROTECTED_BRANCH = "DOM_3001", UNCOMMITTED_CHANGES = "DOM_3002", MONOREPO_ROOT_VIOLATION = "DOM_3003", UNKNOWN = "DOM_9999" } export interface DomainErrorOptions { code?: DomainErrorCode; message: string; cause?: Error; metadata?: Record; } /** * Base class for all domain errors * Provides consistent error handling with codes and metadata */ export declare abstract class DomainError extends Error { readonly code: DomainErrorCode; readonly timestamp: Date; readonly metadata: Record; readonly cause?: Error; constructor(options: DomainErrorOptions); /** * Get error code for programmatic handling */ getCode(): DomainErrorCode; /** * Get error timestamp */ getTimestamp(): Date; /** * Get error metadata */ getMetadata(): Record; /** * Get specific metadata value */ getMetadataValue(key: string): T | undefined; /** * Get underlying cause if available */ getCause(): Error | undefined; /** * Check if error is of specific code */ isCode(code: DomainErrorCode): boolean; /** * Serialize error to JSON */ toJSON(): Record; } //# sourceMappingURL=DomainError.d.ts.map