UNPKG

@accounter/shaam-uniform-format-generator

Version:

Fully typed application that generates, parses, and validates SHAAM uniform format tax reports (INI.TXT and BKMVDATA.TXT).

26 lines (25 loc) 522 B
/** * Error handling utilities */ /** * Custom error class for SHAAM format generation errors */ export class ShaamFormatError extends Error { errors; constructor(message, errors = []) { super(message); this.errors = errors; this.name = 'ShaamFormatError'; } } /** * Creates a validation error object */ export function createValidationError(recordType, recordIndex, field, message) { return { recordType, recordIndex, field, message, }; }