Class: AstmStrictError
Thrown by parseAstmRecords in strict mode when the lenient parser
would otherwise have accumulated one or more Tier-2 warnings. Carries the
warnings (code + position, never a value) so a caller can see every deviation.
Example
import { parseAstmRecords, AstmStrictError } from "@cosyte/astm";
try {
parseAstmRecords("H|\\^&\rZ|1\r", { strict: true });
} catch (err) {
if (err instanceof AstmStrictError) err.warnings.length; // >= 1
}
Extends
Error
Constructors
Constructor
new AstmStrictError(
warnings):AstmStrictError
Internal
Parameters
warnings
readonly AstmRecordWarning[]
Returns
AstmStrictError
Overrides
Error.constructor
Properties
warnings
readonlywarnings: readonlyAstmRecordWarning[]