mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-20 19:36:19 +08:00
[tools] gen_settings: error if a handler but no module attribute is specified
previously it just silently ignored the handler, which is really really bad!
This commit is contained in:
@@ -81,9 +81,14 @@ let print_dl_settings = fun settings ->
|
||||
let v = ExtXml.attrib s "var" in
|
||||
begin
|
||||
try
|
||||
let h = ExtXml.attrib s "handler" and
|
||||
m = ExtXml.attrib s "module" in
|
||||
lprintf "case %d: %s_%s( _value ); _value = %s; break;\\\n" !idx (Filename.basename m) h v
|
||||
let h = ExtXml.attrib s "handler" in
|
||||
begin
|
||||
try
|
||||
let m = ExtXml.attrib s "module" in
|
||||
lprintf "case %d: %s_%s( _value ); _value = %s; break;\\\n" !idx (Filename.basename m) h v
|
||||
with
|
||||
ExtXml.Error e -> prerr_endline (sprintf "Error: You need to specify the module attribute for setting %s to use the handler %s" v h); exit 1
|
||||
end;
|
||||
with
|
||||
ExtXml.Error e -> lprintf "case %d: %s = _value; break;\\\n" !idx v
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user