[Libreoffice-commits] core.git: desktop/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 21 08:35:54 UTC 2020


 desktop/source/pkgchk/unopkg/unopkg_app.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 95f947439638b47a2d1d1fa33b8f70e32293fce9
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Jan 10 08:29:08 2020 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Tue Jan 21 09:35:21 2020 +0100

    unopkg: Improve error message display
    
    Change-Id: Ic842a3be82094557efde6cc22b11b6567c2ad85b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86519
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 5600de4619e9..443ccdbe842b 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -188,7 +188,7 @@ Reference<deployment::XPackage> findPackage(
 extern "C" int unopkg_main()
 {
     tools::extendApplicationEnvironment();
-    bool bNoOtherErrorMsg = false;
+    bool bShowFailedMsg = true;
     OUString subCommand;
     bool option_shared = false;
     bool option_force = false;
@@ -595,11 +595,11 @@ extern "C" int unopkg_main()
     catch (const ucb::CommandFailedException &e)
     {
         logger->log(LogLevel::SEVERE, "Exception occurred: $1$", e.Message);
-        bNoOtherErrorMsg = true;
     }
     catch (const ucb::CommandAbortedException &)
     {
         logger->log(LogLevel::SEVERE, "$1$ aborted.", APP_NAME);
+        bShowFailedMsg = false;
     }
     catch (const deployment::DeploymentException & exc)
     {
@@ -610,7 +610,7 @@ extern "C" int unopkg_main()
     {
         // No logger since it requires UNO which we don't have here
         dp_misc::writeConsoleError(e.Message + "\n");
-        bNoOtherErrorMsg = true;
+        bShowFailedMsg = false;
     }
     catch (const css::uno::Exception & e ) {
         Any exc( ::cppu::getCaughtException() );
@@ -618,7 +618,7 @@ extern "C" int unopkg_main()
         logger->log(LogLevel::SEVERE, "Exception occurred: $1$", e.Message);
         logger->log(LogLevel::INFO, "    Cause: $1$", comphelper::anyToString(exc));
     }
-    if (!bNoOtherErrorMsg)
+    if (bShowFailedMsg)
         logger->log(LogLevel::SEVERE, "$1$ failed.", APP_NAME);
     dp_misc::disposeBridges(xLocalComponentContext);
     return 1;


More information about the Libreoffice-commits mailing list