[Libreoffice-commits] online.git: tools/Replay.hpp tools/Stress.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Feb 10 07:04:18 UTC 2017
tools/Replay.hpp | 17 ++++++++++++++---
tools/Stress.cpp | 2 +-
2 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit c7a5798abcafbc3583c8ff4ce1ecdaf3e0ebb204
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Fri Feb 10 01:02:32 2017 -0500
wsd: handle exceptions so a bad session doesn't stop replaying
Change-Id: I2a92c8f16ab9f6a1a5d55472c5db0f9d6ed3fa67
Reviewed-on: https://gerrit.libreoffice.org/34114
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/tools/Replay.hpp b/tools/Replay.hpp
index 99806ec..5a23935 100644
--- a/tools/Replay.hpp
+++ b/tools/Replay.hpp
@@ -45,9 +45,20 @@ public:
std::shared_ptr<LOOLWebSocket> getWS() const { return _ws; };
/// Send a command to the server.
- void send(const std::string& data) const
+ bool send(const std::string& data) const
{
- helpers::sendTextFrame(_ws, data, _name);
+ try
+ {
+ helpers::sendTextFrame(_ws, data, _name);
+ return true;
+ }
+ catch (const std::exception& exc)
+ {
+ std::cout << "Error in " << _name << " while sending ["
+ << data << "]: " << exc.what() << std::endl;
+ }
+
+ return false;
}
/// Poll socket until expected prefix is fetched, or timeout.
@@ -96,7 +107,7 @@ public:
{
try
{
- replay();
+ replay();
}
catch (const Poco::Exception &e)
{
diff --git a/tools/Stress.cpp b/tools/Stress.cpp
index d0e9dde..5f9b7ea 100644
--- a/tools/Stress.cpp
+++ b/tools/Stress.cpp
@@ -243,7 +243,7 @@ void Stress::defineOptions(OptionSet& optionSet)
}
void Stress::handleOption(const std::string& optionName,
- const std::string& value)
+ const std::string& value)
{
Application::handleOption(optionName, value);
More information about the Libreoffice-commits
mailing list