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

Stephan Bergmann sbergman at redhat.com
Fri Oct 11 02:08:24 PDT 2013


 desktop/source/app/dispatchwatcher.cxx |   23 ++++++++++++++---------
 desktop/source/migration/migration.cxx |    4 ++--
 2 files changed, 16 insertions(+), 11 deletions(-)

New commits:
commit 5645564d9cf20bb54accceb5b6bcf4990e05f476
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 11 11:08:02 2013 +0200

    -Werror,-Wunused-variable
    
    Change-Id: I4727687b1f359ecf4eb8855b7894bf2a2047ba9d

diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 7105aa2..53a9ed2 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -327,10 +327,13 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
                     else
                         xDispatcher->dispatch( aURL, aArgs2 );
                 }
-                catch (const ::com::sun::star::uno::Exception&)
+                catch (const ::com::sun::star::uno::Exception& e)
                 {
-                    OUString aMsg = "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: ";
-                    OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
+                    SAL_WARN(
+                        "desktop.app",
+                        "Desktop::OpenDefault() ignoring Exception while"
+                            " calling XNotifyingDispatch: \"" << e.Message
+                            << "\"");
                 }
             }
         }
@@ -385,15 +388,17 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
             }
             catch (const ::com::sun::star::lang::IllegalArgumentException& iae)
             {
-                OUString aMsg = "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: "
-                    + iae.Message;
-                OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
+                SAL_WARN(
+                    "desktop.app",
+                    "Dispatchwatcher IllegalArgumentException while calling"
+                        " loadComponentFromURL: \"" << iae.Message << "\"");
             }
             catch (const com::sun::star::io::IOException& ioe)
             {
-                OUString aMsg = "Dispatchwatcher IOException while calling loadComponentFromURL: "
-                    + ioe.Message;
-                OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
+                SAL_WARN(
+                    "desktop.app",
+                    "Dispatchwatcher IOException while calling"
+                        " loadComponentFromURL: \"" << ioe.Message << "\"");
             }
             if ( aDispatchRequest.aRequestType == REQUEST_OPEN ||
                  aDispatchRequest.aRequestType == REQUEST_VIEW ||
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 932c9fb..f8f3153 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -883,8 +883,8 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
     }
     catch (const com::sun::star::uno::Exception& e)
     {
-        OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
-        OSL_FAIL(aMsg.getStr());
+        SAL_WARN(
+            "desktop.migration", "ignoring Exception \"" << e.Message << "\"");
     }
     return xNameAccess;
 }


More information about the Libreoffice-commits mailing list