[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sun Oct 23 20:56:41 UTC 2016


 loolwsd/DocumentBroker.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 167f0bf70cc73a8b3b264d0f96734403b1268cee
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Thu Oct 20 19:06:00 2016 -0400

    loolwsd: throw an exception rather than rethrow nothing
    
    Change-Id: I1b85978d3049b39a15fded31582c2d6a62d90689
    Reviewed-on: https://gerrit.libreoffice.org/30186
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index f45e28a..61c1fc5 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -449,8 +449,9 @@ size_t DocumentBroker::addSession(std::shared_ptr<ClientSession>& session)
         loaded = load(id, std::to_string(_childProcess->getPid()));
         if (!loaded)
         {
-            Log::error("Error loading document with URI [" + session->getPublicUri().toString() + "].");
-            throw;
+            const auto msg = "Failed to load document with URI [" + session->getPublicUri().toString() + "].";
+            Log::error(msg);
+            throw std::runtime_error(msg);
         }
     }
     catch (const StorageSpaceLowException&)


More information about the Libreoffice-commits mailing list