summaryrefslogtreecommitdiff
path: root/cppuhelper/source/component_context.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-02-17 18:12:30 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-02-18 09:37:16 +0100
commit3714d1c599308059db351b9867b9350aa533e3e3 (patch)
tree0daa5f8a94985da620e840b5ed67325f70dd9e5e /cppuhelper/source/component_context.cxx
parentac73516da34658005eb06cf1acdd4817ab355a57 (diff)
Do not throw when a singleton can't be raised, only warn.
This can happen for mobile platforms where we don't need singletons like com.sun.star.deployment.ExtensionManager. Change-Id: Iad6729539c7ed1ad2b3315c7b9a35647e92ebbff
Diffstat (limited to 'cppuhelper/source/component_context.cxx')
-rw-r--r--cppuhelper/source/component_context.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index b6ebb3da079f..be4065d61479 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -600,22 +600,16 @@ Any ComponentContext::lookupMap( OUString const & rName )
}
catch (Exception & exc) // rethrow as WrappedTargetRuntimeException
{
- Any caught( getCaughtException() );
OUStringBuffer buf;
buf.append( "exception occurred raising singleton \"" );
buf.append( rName );
buf.append( "\": " );
buf.append( exc.Message );
- throw lang::WrappedTargetRuntimeException(
- buf.makeStringAndClear(), static_cast<OWeakObject *>(this),caught );
+ SAL_WARN("cppuhelper", buf.makeStringAndClear());
}
- if (! xInstance.is())
- {
- throw RuntimeException(
- "no service object raising singleton " + rName,
- static_cast<OWeakObject *>(this) );
- }
+ SAL_WARN_IF(!xInstance.is(),
+ "cppuhelper", "no service object raising singleton " << rName);
Any ret;
guard.reset();