diff --git a/mainApk.pas b/mainApk.pas index beee92e..ca9e079 100644 --- a/mainApk.pas +++ b/mainApk.pas @@ -1616,7 +1616,26 @@ begin var LDbg := AUrl.Substring(6); if LDbg.Contains('?') then LDbg := LDbg.Substring(0, LDbg.IndexOf('?')) + '?...'; Log('cmd ' + LDbg); - HandleWebCommand(AUrl.Substring(6)); + // AUCUNE EXCEPTION NE SORT DU PONT SANS LAISSER SON NOM. + // + // Le dispatch n'etait garde par rien : une faute dans un handler remontait + // jusqu'a FMX, qui affichait "Access violation" avec une adresse - et le + // journal, lui, ne montrait que la commande recue suivie de rien. On savait + // qu'une commande echouait, jamais laquelle ni pourquoi, et c'est + // exactement la difference entre chercher et trouver. + // + // On attrape, on nomme, on rend la main : une commande fautive ne doit pas + // laisser l'interface voilee derriere une boite de dialogue. + try + HandleWebCommand(AUrl.Substring(6)); + except + on E: Exception do + begin + Log('cmd ' + LDbg + ' FAILED: ' + E.ClassName + ' - ' + E.Message); + SetBusy(False); + StatusErr('Command failed - see log'); + end; + end; end; end;