baml.csv.ErrorKind

Classifies an `Error` for portable handling.

Reference version

Signature

enum baml.csv.ErrorKind

Classifies an Error for portable handling.

Match on this rather than on Error.message, which is prose and not stable. The split that matters is Options and Header against the record-scoped kinds below them: those two are mistakes in the setup, which no amount of retrying rows will fix, so on_error = "skip" never suppresses them.

Source:<builtin>/baml/ns_csv/csv.bamlbytes 934–1720

Variants

Options

Invalid configuration, or an operation the handle does not support.

Quote

Unterminated or stray quote in a record.

FieldCount

Record width differs from the expected width (see ReaderOptions.ragged).

Encoding

Invalid UTF-8 in a record (encoding = "utf8").

Decode

A cell could not convert to the requested type.

Encode

A value not representable under the writer options.

NotFound

decode_one on an input with zero data records.

TooManyRows

decode_one / decode_optional on an input with extra records.

Closed

Operation on a closed reader or writer.

Implementations

baml.Concrete for T

Source:<builtin>/baml/core.bamlbytes 763–795