Module type Read_intf.On_invalid_row

If we can read a row correctly but the 'a t provided can't convert it, your 'a On_invalid_row.t will define what happens.

Here, 'read a row correctly' means that it's valid CSV (subject to your delimiter etc) & it has the correct number of columns. If that's not the case the parsers will just raise.

type 'a t
val raise : _ t

The default. Raise.

val skip : _ t

Skip the bad row

val create : (int Core_kernel.String.Map.t -> string Delimited_kernel__.Append_only_buffer.t -> exn -> [ `Skip | `Yield of 'a | `Raise of exn ]) -> 'a t

Do something else!

  • `Skip: skip the line. Same as skip above.
  • `Yield: return the given value for this row.
  • `Raise: raise the given exception