···3232 let ep_dir = find_everparse_dir () in
3333 let src = Filename.concat ep_dir "src/3d/EverParseEndianness.h" in
3434 if Sys.file_exists src then copy_file ~src ~dst
3535- else failwith (Fmt.str "Cannot find EverParseEndianness.h at %s" src)
3535+ else Fmt.failwith "Cannot find EverParseEndianness.h at %s" src
3636 end
37373838let has_3d_exe () = Sys.command "command -v 3d.exe > /dev/null 2>&1" = 0
···4343 let f = s.name ^ ".3d" in
4444 let cmd = Fmt.str "cd %s && 3d.exe --batch %s" outdir f in
4545 let ret = Sys.command cmd in
4646- if ret <> 0 then
4747- failwith (Fmt.str "EverParse failed on %s with code %d" f ret))
4646+ if ret <> 0 then Fmt.failwith "EverParse failed on %s with code %d" f ret)
4847 schemas;
4948 copy_everparse_endianness ~outdir
5049···8180 close_in ic;
8281 match !result with
8382 | Some fn -> fn
8484- | None -> failwith (Fmt.str "Could not find Validate function in %s" header)
8383+ | None -> Fmt.failwith "Could not find Validate function in %s" header
85848685let generate_test ~outdir schemas =
8786 let oc = open_out (Filename.concat outdir "test.c") in
+2-2
lib/diff-gen/diff_gen.ml
···2626 schema_dir
2727 in
2828 let ret = Sys.command cmd in
2929- if ret <> 0 then failwith (Fmt.str "EverParse failed with code %d" ret)
2929+ if ret <> 0 then Fmt.failwith "EverParse failed with code %d" ret
30303131(** {1 Extracting EverParse-generated Function Names}
3232···6262 close_in ic;
6363 match !result with
6464 | Some fn -> fn
6565- | None -> failwith (Fmt.str "Could not find Validate function in %s" header)
6565+ | None -> Fmt.failwith "Could not find Validate function in %s" header
66666767(** {1 Code Generation} *)
6868
+1-1
test/diff/gen_c.ml
···299299 schema_dir
300300 in
301301 let ret = Sys.command cmd in
302302- if ret <> 0 then failwith (Fmt.str "EverParse failed with code %d" ret)
302302+ if ret <> 0 then Fmt.failwith "EverParse failed with code %d" ret
303303304304(* ---- Main ---- *)
305305