/** * Centralized error handling utilities * * Provides consistent error handling and user feedback across all CLI commands * as recommended in CLI-REFACTOR-IMPLEMENTATION-GUIDE.md section 7 * * @version 2.1.3 * @author Requirements Gathering Agent Team * @created July 2025 * * @filepath c:\Users\menno\Source\Repos\requirements-gathering-agent\src\utils\errorHandler.ts */ import { CommandResult } from '../types.js'; /** * Log levels for different types of messages */ export declare enum LogLevel { ERROR = "error", WARN = "warn", INFO = "info", DEBUG = "debug" } /** * Handle errors with appropriate user feedback and exit codes */ export declare function handleError(error: Error, quiet?: boolean): never; /** * Log messages with appropriate formatting based on level and quiet mode */ export declare function log(message: string, level?: LogLevel, quiet?: boolean): void; /** * Validate common command options */ export declare function validateBaseOptions(options: any): void; /** * Validate file path exists and is accessible */ export declare function validateFilePath(filePath: string, description?: string): Promise; /** * Validate directory exists and is writable */ export declare function validateOutputDirectory(dirPath: string): Promise; /** * Wrap async command execution with error handling */ export declare function executeWithErrorHandling(commandFn: () => Promise, quiet?: boolean): Promise>; /** * Create a standardized success message */ export declare function logSuccess(message: string, quiet?: boolean): void; /** * Create a standardized warning message */ export declare function logWarning(message: string, quiet?: boolean): void; /** * Create a standardized info message */ export declare function logInfo(message: string, quiet?: boolean): void; //# sourceMappingURL=errorHandler.d.ts.map