summaryrefslogtreecommitdiffstats
path: root/wsd/LOOLWSD.hpp
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2020-09-08 14:06:47 +0200
committerMichael Meeks <michael.meeks@collabora.com>2020-09-09 08:55:55 +0200
commitd876290762ee7af989b08c60a5ed9aa3c5a68f96 (patch)
treefe8b03f2e826963453b7ee9eecabba8ad379ba8b /wsd/LOOLWSD.hpp
parentleaflet: hyperlink popup will not displace the view (diff)
downloadonline-d876290762ee7af989b08c60a5ed9aa3c5a68f96.tar.gz
online-d876290762ee7af989b08c60a5ed9aa3c5a68f96.zip
wsd: Don't fail if config item is missing in loolwsd.xml
After upgrading from old versions that didn't include config.storage.ssl in loolwsd.xml, an exception was thrown and not caught, and loolwsd failed to start with the following message: "Not found: storage.ssl.cert_file_path". Change-Id: Id0ca76632c513c6f5c80797a2c7d20f0173e4b56 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102250 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'wsd/LOOLWSD.hpp')
-rw-r--r--wsd/LOOLWSD.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 533c4dfd05..7f1e05a275 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -351,7 +351,15 @@ public:
static
std::string getPathFromConfigWithFallback(const std::string& name, const std::string& fallbackName)
{
- std::string value = LOOLWSD::getPathFromConfig(name);
+ std::string value;
+ // the expected path might not exist, in which case Poco throws an exception
+ try
+ {
+ value = LOOLWSD::getPathFromConfig(name);
+ }
+ catch (...)
+ {
+ }
if (value.empty())
return LOOLWSD::getPathFromConfig(fallbackName);
return value;