loleaflet/js/global.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 6ca47a7ab0f7affe02d1e3fe588e1182c91d28ca Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Thu Oct 31 10:03:47 2019 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Oct 31 10:24:01 2019 +0200 For a mobile app, call window.postMobileError() in window.onerror() Sadly it doesn't seem to work, though, at least on iOS, if I as a test re-introduce the error that was fixed by 2ddd8d7c8150950c48831279579f3caab578378b. But maybe it will work for other uncaught errors. Clearly it is better than letting the code attempt do the XMLHttpRequest thing which is totally wrong and pointless in an app. Change-Id: I7b6e95556603b680527a0516f54e24dc10e96b21 diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js index 9e603b3d6..ffc0a1d4b 100644 --- a/loleaflet/js/global.js +++ b/loleaflet/js/global.js @@ -47,7 +47,9 @@ column: col }, desc = err.message || {}, stack = err.stack || {}; var log = 'jserror ' + JSON.stringify(data, null, 2) + '\n' + desc + '\n' + stack + '\n'; - if (global.socket && (global.socket instanceof WebSocket) && global.socket.readyState === 1) { + if (window.ThisIsAMobileApp) { + window.postMobileError(log); + } else if (global.socket && (global.socket instanceof WebSocket) && global.socket.readyState === 1) { global.socket.send(log); } else if (global.socket && (global.socket instanceof global.L.Socket) && global.socket.connected()) { global.socket.sendMessage(log); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits