aboutsummaryrefslogtreecommitdiff
path: root/lib/errors/importErrors.mli
blob: 7d17a5d3560ef1cb2a403eef7ff9a4bfa5f8789b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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