summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-22 09:34:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-22 09:41:47 +0100
commit70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1 (patch)
treeffb31ef817b5f2037cf7c332da422b9179d613d5 /desktop
parentf2972242673cc9608960e9ca70e82766be5275e3 (diff)
New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros. * New SAL_STREAM supersedes OSL_FORMAT. * oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now). * TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site cleanup). * Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet addressed. * Some replacements tools String -> rtl::OUString.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 672364d9645f..e847c3cf1bea 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -31,8 +31,10 @@
#include "dp_backend.h"
#include "dp_ucb.h"
+#include "rtl/oustringostreaminserter.hxx"
#include "rtl/uri.hxx"
#include "rtl/bootstrap.hxx"
+#include "sal/log.h"
#include "osl/file.hxx"
#include "cppuhelper/exc_hlp.hxx"
#include "comphelper/servicedecl.hxx"
@@ -73,7 +75,7 @@ void PackageRegistryBackend::disposing( lang::EventObject const & event )
::osl::MutexGuard guard( getMutex() );
if ( m_bound.erase( url ) != 1 )
{
- OSL_ASSERT( false );
+ SAL_WARN_S("basic", "erase(" << url << ") != 1");
}
}
@@ -207,8 +209,9 @@ Reference<deployment::XPackage> PackageRegistryBackend::bindPackage(
m_bound.insert( t_string2ref::value_type( url, xNewPackage ) ) );
if (insertion.second)
{ // first insertion
- OSL_ASSERT( Reference<XInterface>(insertion.first->second)
- == xNewPackage );
+ SAL_WARN_IF(
+ Reference<XInterface>(insertion.first->second) != xNewPackage,
+ "desktop", "mismatch");
}
else
{ // found existing entry
@@ -339,7 +342,7 @@ Package::Package( ::rtl::Reference<PackageRegistryBackend> const & myBackend,
if (m_bRemoved)
{
//We use the last segment of the URL
- OSL_ASSERT(m_name.getLength() == 0);
+ SAL_WARN_IF(!m_name.isEmpty(), "basic", "non-empty m_name");
OUString name = m_url;
rtl::Bootstrap::expandMacros(name);
sal_Int32 index = name.lastIndexOf('/');
@@ -679,11 +682,8 @@ void Package::processPackage_impl(
}
catch (RuntimeException &e) {
(void) e; // avoid warnings
- OSL_FAIL(
- OSL_FORMAT(
- "unexpected RuntimeException \"%s\"",
- (rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
- getStr())));
+ SAL_WARN_S(
+ "basic", "unexpected RuntimeException \"" << e.Message << '"');
throw;
}
catch (CommandFailedException &) {