{"version":3,"file":"errors.cjs","names":[],"sources":["../../../src/support/errors.ts"],"sourcesContent":["export class ScanError extends Error {\n  constructor(\n    message: string,\n    readonly filePath?: string,\n  ) {\n    super(filePath ? `${message} (${filePath})` : message);\n    this.name = \"ScanError\";\n  }\n}\n\nexport class ScanErrorCollection extends Error {\n  constructor(readonly errors: ScanError[]) {\n    super(formatScanErrors(errors));\n    this.name = \"ScanErrorCollection\";\n  }\n}\n\nexport function formatScanErrors(errors: ScanError[]): string {\n  return errors.map((error) => `- ${error.message}`).join(\"\\n\");\n}\n"],"mappings":";AAAA,IAAa,YAAb,cAA+B,MAAM;CAGxB;CAFX,YACE,SACA,UACA;EACA,MAAM,WAAW,GAAG,QAAQ,IAAI,SAAS,KAAK,OAAO;EAF5C,KAAA,WAAA;EAGT,KAAK,OAAO;CACd;AACF;AAEA,IAAa,sBAAb,cAAyC,MAAM;CACxB;CAArB,YAAY,QAA8B;EACxC,MAAM,iBAAiB,MAAM,CAAC;EADX,KAAA,SAAA;EAEnB,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,iBAAiB,QAA6B;CAC5D,OAAO,OAAO,KAAK,UAAU,KAAK,MAAM,SAAS,CAAC,CAAC,KAAK,IAAI;AAC9D"}