mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-21 03:43:26 +08:00
[generators] more verbose error reports
if someone actually manages to provide a directory instead of a xml file
This commit is contained in:
@@ -237,6 +237,7 @@ let my_xml_parse_file =
|
||||
let parse_file = fun ?(noprovedtd = false) file ->
|
||||
try (if noprovedtd then my_xml_parse_file else Xml.parse_file) file
|
||||
with
|
||||
| Sys_error e -> failwith (sprintf "Error loading xml file %s: %s" file e)
|
||||
| Xml.Error e -> failwith (sprintf "XML error in %s: %s" file (Xml.error e))
|
||||
| Xml.File_not_found f -> failwith (sprintf "File not found: %s" f)
|
||||
| Dtd.Prove_error e -> failwith (sprintf "DTD prove error in %s: %s" file (Dtd.prove_error e))
|
||||
|
||||
@@ -346,7 +346,7 @@ let () =
|
||||
mkdir (aircraft_conf_dir // "telemetry");
|
||||
|
||||
let target = try Sys.getenv "TARGET" with _ -> "" in
|
||||
let modules = Gen_common.get_modules_of_config ~target (ExtXml.parse_file abs_airframe_file) (Xml.parse_file abs_flight_plan_file) in
|
||||
let modules = Gen_common.get_modules_of_config ~target (ExtXml.parse_file abs_airframe_file) (ExtXml.parse_file abs_flight_plan_file) in
|
||||
(* normal settings *)
|
||||
let settings = try Env.filter_settings (value "settings") with _ -> "" in
|
||||
(* remove settings if not supported for the current target *)
|
||||
|
||||
Reference in New Issue
Block a user