Skip to content
Snippets Groups Projects
Commit 40d63be2 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

Merge branch 'fix/andre/server-batch-json-error' into 'master'

[Server] fail more gracefully with invalid JSON files

See merge request frama-c/frama-c!2794
parents c0c0e17e ee8bf048
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,13 @@ let execute () =
List.iter
begin fun file ->
Senv.feedback "Script %S" file ;
let response = execute_batch (Js.from_file file) in
let response =
try
execute_batch (Js.from_file file)
with Yojson.Json_error msg ->
Senv.error "[batch] error in JSON file:@\n%s@." msg;
`Null
in
let output = Filename.remove_extension file ^ ".out.json" in
let output = match BatchOutputDir.get () with
| "" -> output
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment