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).

31 lines (30 loc) 720 B
"use strict"; /** * Error handling utilities */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ShaamFormatError = void 0; exports.createValidationError = createValidationError; /** * Custom error class for SHAAM format generation errors */ class ShaamFormatError extends Error { errors; constructor(message, errors = []) { super(message); this.errors = errors; this.name = 'ShaamFormatError'; } } exports.ShaamFormatError = ShaamFormatError; /** * Creates a validation error object */ function createValidationError(recordType, recordIndex, field, message) { return { recordType, recordIndex, field, message, }; }