1
0
Fork 0

Better error messaging for simbrief download failure

This commit is contained in:
legoboyvdlp R 2020-08-07 13:01:15 +01:00
parent b8c31535c4
commit 0aefdda66d

View file

@ -11,9 +11,13 @@ var SimbriefParser = {
me.inhibit = 1;
var stamp = systime();
http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml")
.fail(func mcdu.mcdu_message(i, "SIMBRIEF DOWNLOAD FAILED"))
.fail(func me.failure(i))
.done(func me.read(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml", i));
},
failure: func(i) {
mcdu.mcdu_message(i, "SIMBRIEF DOWNLOAD FAILED");
me.inhibit = 0;
},
read: func(xml, i) {
var data = io.readxml(xml);
if (data != nil) {