baml.csv.Error
A CSV error with positional diagnostics.
Signature
class baml.csv.ErrorA CSV error with positional diagnostics.
kind is for portable handling. line, record, field, and column
make "row 41,283 has 7 fields, expected 8" cheap to report.
Every positional field is optional, because not every error has a position:
a bad option is caught before parsing starts, and NotFound /
TooManyRows are about the input as a whole. They narrow as the failure
does — line and record whenever a record is in hand, field and
column when one cell is at fault, expected and found only for
FieldCount.
Source:<builtin>/baml/ns_csv/csv.bamlbytes 2305–2748
Fields
kind
message
stringline
int | null1-based line in the source where the offending record starts.
record
int | null0-based data-record index (header excluded).
field
int | null0-based field index within the record.
column
string | nullHeader name, when known.
expected
int | nullFieldCount: expected width.
found
int | nullFieldCount: actual width.
Implementations
baml.Concrete for T
Source:<builtin>/baml/core.bamlbytes 763–795