mirror of
https://gitlab.com/scemama/EZFIO.git
synced 2024-11-19 04:22:25 +01:00
Better error message in OCaml
This commit is contained in:
parent
4142dac475
commit
8e20da23d5
@ -378,7 +378,9 @@ let read_array type_conversion group name : 'a ezfio_array =
|
|||||||
(* Read one-dimensional arrays *)
|
(* Read one-dimensional arrays *)
|
||||||
let read_1d nmax =
|
let read_1d nmax =
|
||||||
Ezfio_item (Array.init nmax (fun i->
|
Ezfio_item (Array.init nmax (fun i->
|
||||||
type_conversion (trim (input_line in_channel))) )
|
let buffer = trim (input_line in_channel) in
|
||||||
|
try type_conversion buffer with
|
||||||
|
| Failure s -> failwith (s^": "^buffer))
|
||||||
in
|
in
|
||||||
(* Read multi-dimensional arrays *)
|
(* Read multi-dimensional arrays *)
|
||||||
let rec read_nd = function
|
let rec read_nd = function
|
||||||
|
Loading…
Reference in New Issue
Block a user