module CSV = ImportCSV

exception SqlError of Sqlite3.Rc.t
exception MisplacedWindow

exception Unknown_source of string
(** Exception raised when a source used in a path is not declared as an
    external *)

exception Cycle of string list
(** Cycle between the dpendencies *)

exception Unknown_extension of string

exception
  JsonError of {
    json : string;
    element : string;
  }

type xlsError = {
  source : ImportDataTypes.Table.t;
  row : int;
  sheet : int;
  target : ImportDataTypes.Table.t option;
  value : CSV.DataType.t;
  exn : exn;
}

exception
  TypeError of {
    expected : ImportDataTypes.Types.t;
    actual : ImportDataTypes.Types.t;
    expression : string;
    subset : string;
  }

exception InvalidEncoding of string
exception NullKey of int

val repr_error : exn -> string

type t = Csv.out_channel Lazy.t

val output_error : t -> xlsError -> unit
val log : with_bom:bool -> string -> string -> t