format parse error from code
Mojo function š”
format_parse_error_from_code
Section titled āformat_parse_error_from_codeādef format_parse_error_from_code(code: FastxErrorCode, record_number: Int, line_number: Int, file_position: Int64, record_snippet: String = "") -> StringBuild full ParseError string from error code and context (cold path).
Returns the full formatted error string, including contextual lines such as
āRecord numberā, āLine numberā, āFile positionā, and āRecord snippetā when
that information is available. This is used by callers that raise
Error(String) so that String(Error) already contains rich context.
Args:
- code (
FastxErrorCode) - record_number (
Int) - line_number (
Int) - file_position (
Int64) - record_snippet (
String)
Returns:
String