summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-02-25 13:08:35 +0100
committerMichael Stahl <mstahl@redhat.com>2013-02-25 14:27:06 +0100
commit113a9273412b59c1ae1d1728705e1105fe3f2a93 (patch)
tree1fedd6d0f34d7c87f1a609fde0917041b8e02d70 /cppuhelper
parent0e273d6fb8566e7f8df1be6f2f440fe357991878 (diff)
cppuhelper: log failures from osl_loadModule calls
Change-Id: I37099d15cd403f48ca1716414f2e79cc1213d8c8
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/shlib.cxx42
1 files changed, 17 insertions, 25 deletions
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 9fe86e4bfa29..0408c37df01e 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -484,9 +484,10 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
OUString aModulePath( makeComponentPath( sLibName, rPath ) );
if (! checkAccessPath( &aModulePath ))
{
- throw loader::CannotActivateFactoryException(
- "permission denied to load component library: " +
- aModulePath,
+ OUString const msg(
+ "permission denied to load component library: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw loader::CannotActivateFactoryException(msg,
Reference< XInterface >() );
}
@@ -494,8 +495,9 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
aModulePath.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
if (! lib)
{
- throw loader::CannotActivateFactoryException(
- "loading component library failed: " + aModulePath,
+ OUString const msg("loading component library failed: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw loader::CannotActivateFactoryException(msg,
Reference< XInterface >() );
}
#else
@@ -607,11 +609,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
#ifndef DISABLE_DYNLOADING
osl_unloadModule( lib );
#endif
-#if OSL_DEBUG_LEVEL > 1
- out( "### cannot activate factory: " );
- out( aExcMsg );
- out( "\n" );
-#endif
+ SAL_WARN("cppuhelper", "### cannot activate factory: " << aExcMsg);
throw loader::CannotActivateFactoryException(
aExcMsg,
Reference< XInterface >() );
@@ -639,11 +637,7 @@ Reference< XInterface > SAL_CALL invokeStaticComponentFactory(
if (! xRet.is())
{
-#if OSL_DEBUG_LEVEL > 1
- out( "### cannot activate factory: " );
- out( aExcMsg );
- out( "\n" );
-#endif
+ SAL_WARN("cppuhelper", "### cannot activate factory: " << aExcMsg);
throw loader::CannotActivateFactoryException(
aExcMsg,
Reference< XInterface >() );
@@ -676,9 +670,10 @@ void SAL_CALL writeSharedLibComponentInfo(
if (! checkAccessPath( &aModulePath ))
{
- throw registry::CannotRegisterImplementationException(
- "permission denied to load component library: " +
- aModulePath,
+ OUString const msg(
+ "permission denied to load component library: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw registry::CannotRegisterImplementationException(msg,
Reference< XInterface >() );
}
@@ -686,8 +681,9 @@ void SAL_CALL writeSharedLibComponentInfo(
aModulePath.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
if (! lib)
{
- throw registry::CannotRegisterImplementationException(
- "loading component library failed: " + aModulePath,
+ OUString const msg("loading component library failed: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw registry::CannotRegisterImplementationException(msg,
Reference< XInterface >() );
}
@@ -768,11 +764,7 @@ void SAL_CALL writeSharedLibComponentInfo(
//! ::osl_unloadModule( lib);
if (! bRet)
{
-#if OSL_DEBUG_LEVEL > 1
- out( "### cannot write component info: " );
- out( aExcMsg );
- out( "\n" );
-#endif
+ SAL_WARN("cppuhelper", "### cannot write component info: " << aExcMsg);
throw registry::CannotRegisterImplementationException(
aExcMsg, Reference< XInterface >() );
}