loolwsd/DocumentBroker.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
New commits: commit ce2309edd814e17be8c148e235d39df3d337ea8d Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Wed Aug 31 20:23:56 2016 -0400 loolwsd: log errors while getting file info Change-Id: I076da575f553f3199fa302f32e8c399b6339fe2c Reviewed-on: https://gerrit.libreoffice.org/28574 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index a2f1d12..1e82696 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -124,21 +124,24 @@ DocumentBroker::DocumentBroker(const Poco::URI& uriPublic, const StorageBase::FileInfo DocumentBroker::validate(const Poco::URI& uri) { - Log::info("Validating: " + uri.toString()); + const auto uriString = uri.toString(); + Log::info("Validating: " + uriString); try { auto storage = StorageBase::create("", "", uri); auto fileinfo = storage->getFileInfo(uri); - Log::info("After checkfileinfo: " + fileinfo._filename); + Log::info("After checkfileinfo: " + uriString + " -> " + fileinfo._filename); if (!fileinfo.isValid()) { + Log::error("Invalid file info for uri " + uriString); throw BadRequestException("Invalid URI or access denied."); } return fileinfo; } - catch (const std::exception&) + catch (const std::exception& ex) { + Log::error("Exception while getting file info for uri " + uriString + ": " + ex.what()); throw BadRequestException("Invalid URI or access denied."); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits