aboutsummaryrefslogtreecommitdiff
path: root/lib/errors
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2025-03-17 09:11:25 +0100
committerSébastien Dailly <sebastien@dailly.me>2025-03-17 18:59:32 +0100
commit8b8b730d3ba98d6c9e4e6274844641043b5fefbb (patch)
tree4cb60dafa05b479d0ca287d501a51db88cecaaa4 /lib/errors
parent7bfbb67d83011f3e1845dcb9e44c3b6a5e93a9da (diff)
Moved the syntax module in its own library
Diffstat (limited to 'lib/errors')
-rw-r--r--lib/errors/dune1
-rw-r--r--lib/errors/importErrors.ml8
-rw-r--r--lib/errors/importErrors.mli4
3 files changed, 5 insertions, 8 deletions
diff --git a/lib/errors/dune b/lib/errors/dune
index c39f47f..98059b5 100644
--- a/lib/errors/dune
+++ b/lib/errors/dune
@@ -4,7 +4,6 @@
ppx_deriving.runtime
csv
sqlite3
- importCSV
importDataTypes
)
)
diff --git a/lib/errors/importErrors.ml b/lib/errors/importErrors.ml
index 7433e9b..a062f38 100644
--- a/lib/errors/importErrors.ml
+++ b/lib/errors/importErrors.ml
@@ -1,5 +1,4 @@
open StdLabels
-module CSV = ImportCSV
module Table = ImportDataTypes.Table
let bom = "\xEF\xBB\xBF"
@@ -9,7 +8,7 @@ type xlsError = {
row : int;
sheet : int;
target : Table.t option;
- value : CSV.DataType.t;
+ value : ImportDataTypes.Value.t;
exn : exn;
}
@@ -35,7 +34,8 @@ exception
let repr_error = function
| SqlError s -> Printf.sprintf "%s Error" (Sqlite3.Rc.to_string s)
| NullKey k ->
- Printf.sprintf "The key %s is null" (ImportCSV.Csv.column_to_string k)
+ Printf.sprintf "The key %s is null"
+ (ImportDataTypes.Path.column_to_string k)
| Unknown_source source ->
Printf.sprintf "The source %s is referenced without beiing declared"
source
@@ -74,7 +74,7 @@ let output_error : t -> xlsError -> unit =
string_of_int error.sheet;
string_of_int error.row;
target;
- CSV.DataType.to_string "C" error.value;
+ ImportDataTypes.Value.to_string "C" error.value;
repr_error error.exn;
]
diff --git a/lib/errors/importErrors.mli b/lib/errors/importErrors.mli
index 445361e..1afcacf 100644
--- a/lib/errors/importErrors.mli
+++ b/lib/errors/importErrors.mli
@@ -1,5 +1,3 @@
-module CSV = ImportCSV
-
exception SqlError of Sqlite3.Rc.t
exception MisplacedWindow
@@ -18,7 +16,7 @@ type xlsError = {
row : int;
sheet : int;
target : ImportDataTypes.Table.t option;
- value : CSV.DataType.t;
+ value : ImportDataTypes.Value.t;
exn : exn;
}