meld
Version:
Meld: A template language for LLM prompts
24 lines (23 loc) • 622 B
text/typescript
import { ResolutionContext, ResolutionErrorCode } from '@services/resolution/ResolutionService/IResolutionService.js';
/**
* Error thrown when variable resolution fails
*/
export class ResolutionError extends Error {
constructor(
message: string,
public readonly code: ResolutionErrorCode,
public readonly details?: {
value?: string;
context?: ResolutionContext;
cause?: Error;
location?: {
filePath?: string;
line?: number;
column?: number;
};
}
) {
super(`Resolution error (${code}): ${message}`);
this.name = 'ResolutionError';
}
}