/** * Custom error classes for consistent error handling across the codebase. * * All errors thrown by this application should be instances of DexError or its subclasses. * This enables consistent error handling, user-friendly messages, and proper error categorization. */ /** * Base error class for all Dex errors. * Provides consistent error structure with user-friendly messages and actionable suggestions. */ export declare class DexError extends Error { /** A suggestion for the user on how to resolve the error */ readonly suggestion?: string; constructor(message: string, suggestion?: string); } /** * Error thrown when a requested resource (task, project, etc.) is not found. */ export declare class NotFoundError extends DexError { /** The type of resource that was not found */ readonly resourceType: string; /** The identifier used to look up the resource */ readonly resourceId: string; constructor(resourceType: string, resourceId: string, suggestion?: string); } /** * Error thrown when an operation would create an invalid state. * Examples: circular parent references, completing a task with pending subtasks. */ export declare class ValidationError extends DexError { constructor(message: string, suggestion?: string); } /** * Error thrown when storage operations fail. */ export declare class StorageError extends DexError { /** The underlying system error, if any */ readonly cause?: Error; constructor(message: string, cause?: Error, suggestion?: string); } /** * Error thrown when stored data is corrupted or in an invalid format. */ export declare class DataCorruptionError extends StorageError { /** Path to the corrupted file */ readonly filePath: string; constructor(filePath: string, cause?: Error, details?: string); } /** * Extract error message and suggestion from any error type. * Used for consistent error formatting across CLI and MCP interfaces. */ export declare function extractErrorInfo(err: unknown): { message: string; suggestion?: string; }; //# sourceMappingURL=errors.d.ts.map