feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility
This commit is contained in:
@@ -146,7 +146,8 @@ export class IntegratedValidator {
|
||||
});
|
||||
results.push(...schematronResults);
|
||||
} catch (error) {
|
||||
console.warn(`Schematron validation failed: ${error.message}`);
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
console.warn(`Schematron validation failed: ${errorMessage}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +225,8 @@ export class IntegratedValidator {
|
||||
try {
|
||||
await this.loadSchematron('EN16931', format);
|
||||
} catch (error) {
|
||||
console.warn(`Could not load Schematron: ${error.message}`);
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
console.warn(`Could not load Schematron: ${errorMessage}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,8 +280,9 @@ export async function createStandardValidator(
|
||||
try {
|
||||
await validator.loadSchematron(standard, format);
|
||||
} catch (error) {
|
||||
console.warn(`Schematron not available for ${standard} ${format}: ${error.message}`);
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
console.warn(`Schematron not available for ${standard} ${format}: ${errorMessage}`);
|
||||
}
|
||||
|
||||
return validator;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user