net/Socket.hpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
New commits: commit 6e596d11f3ebe09ad1b50c395f920b591805f4b6 Author: Ashod Nakashian <[email protected]> Date: Sun Apr 2 19:56:13 2017 -0400 wsd: catch exceptions from callbacks and wakup hook Change-Id: Ib4579a34c91cfe43e5bd7038b175175a9ab0036a Reviewed-on: https://gerrit.libreoffice.org/36033 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/net/Socket.hpp b/net/Socket.hpp index 200c389b..e3d9569d 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -377,9 +377,27 @@ public: } for (size_t i = 0; i < invoke.size(); ++i) - invoke[i](); + { + try + { + invoke[i](); + } + catch (const std::exception& exc) + { + LOG_ERR("Exception while invoking poll [" << _name << + "] callback: " << exc.what()); + } + } - wakeupHook(); + try + { + wakeupHook(); + } + catch (const std::exception& exc) + { + LOG_ERR("Exception while invoking poll [" << _name << + "] wakeup hook: " << exc.what()); + } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
