desktop/source/lib/init.cxx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
New commits: commit 46fbc12dac86579708695fddeaf4a3a2f8098955 Author: Michael Meeks <[email protected]> AuthorDate: Wed Dec 18 13:31:58 2019 +0000 Commit: Michael Meeks <[email protected]> CommitDate: Wed Dec 18 15:29:11 2019 +0100 lok: catch and log exceptions during key / mouse event emission. Change-Id: I2be8219f6b2648f3f0192caeccf8e8b037634dc2 Reviewed-on: https://gerrit.libreoffice.org/85387 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Meeks <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f97cd6707187..c779682e1d71 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3071,7 +3071,15 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nChar return; } - pDoc->postKeyEvent(nType, nCharCode, nKeyCode); + try + { + pDoc->postKeyEvent(nType, nCharCode, nKeyCode); + } + catch (const uno::Exception& exception) + { + SetLastExceptionMsg(exception.Message); + SAL_INFO("lok", "Failed to postKeyEvent " << exception.Message); + } } static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsigned nWindowId, int nType, const char* pText) @@ -3546,8 +3554,15 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX, SetLastExceptionMsg("Document doesn't support tiled rendering"); return; } - - pDoc->postMouseEvent(nType, nX, nY, nCount, nButtons, nModifier); + try + { + pDoc->postMouseEvent(nType, nX, nY, nCount, nButtons, nModifier); + } + catch (const uno::Exception& exception) + { + SetLastExceptionMsg(exception.Message); + SAL_INFO("lok", "Failed to postMouseEvent " << exception.Message); + } } static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
