Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ocaml] print more verbose info on xml loading errors#1570

Merged
gautierhattenberger merged 1 commit into
masterfrom
verbose_xml_errors
Mar 24, 2016
Merged

[ocaml] print more verbose info on xml loading errors#1570
gautierhattenberger merged 1 commit into
masterfrom
verbose_xml_errors

Conversation

@flixr

@flixr flixr commented Mar 22, 2016

Copy link
Copy Markdown
Member

Try to use our own ExtXml.parse_file instead of plain Xml.parse_file in most cases to get a better error report if the xml file is invalid.
e.g.

/home/flixr/code/paparazzi/conf/airframes/examples/bebop.xml: End of tag expected : 'load' line 43 characters 2-11
make: *** [ap.ac_h] Error 1

instead of only

Fatal error: exception Xml.Error(_)
make: * [ap.ac_h] Error 2

@OpenUAS

OpenUAS commented Mar 22, 2016

Copy link
Copy Markdown
Contributor

Very welcomed, I know a 100(student) reasons why ;)
Ideas:
For users encountering issues, the "make: *** [ap.ac_h] Error 1" likely is not all that informative an IMHO can be chopped of the message.

And we could add if XMLerror encountered start with something descriptive to make sure it is a user error that can be fixed.

"There is an Error in your XYZ.shortname.XML you can fix. Your problem to fix is details are:"

@flixr

flixr commented Mar 22, 2016

Copy link
Copy Markdown
Member Author

I don't quite follow... is the message printed with this update not descriptive enough?

Comment thread sw/ground_segment/cockpit/sectors.ml Outdated
| Some f ->
try
let xml = Xml.parse_file f in
let xml = ExtXml.parse_file f in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure this one should be changed, it breaks the try ... catch and the popup message

@flixr flixr force-pushed the verbose_xml_errors branch from 7ff1ccc to 93b81d0 Compare March 24, 2016 10:38
@flixr

flixr commented Mar 24, 2016

Copy link
Copy Markdown
Member Author

@gautierhattenberger thanks for the corrections, updated...

@flixr flixr force-pushed the verbose_xml_errors branch from 93b81d0 to 96de219 Compare March 24, 2016 11:05
@gautierhattenberger gautierhattenberger merged commit a978656 into master Mar 24, 2016
@gautierhattenberger gautierhattenberger deleted the verbose_xml_errors branch March 24, 2016 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants