import type { ErrorCode } from '../types'; /** * Custom error class for LLMXML-specific errors */ export class LLMXMLError extends Error { /** * Creates a new LLMXMLError * * @param message - Human-readable error message * @param code - Error code identifying the type of error * @param details - Optional additional error context */ constructor( message: string, public code: ErrorCode, public details?: unknown ) { super(message); this.name = 'LLMXMLError'; Object.setPrototypeOf(this, LLMXMLError.prototype); } }