summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-02 10:33:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-02 10:33:49 +0100
commitd2615f96acf1030ea888b2f24a9c5bf4db0d9f0e (patch)
treeba8a601c0ac2d9e0083350f321cc1c88382725d0 /cppuhelper
parent1851e87627a48b826afee01f79bfb948eb5691d4 (diff)
Improve some error reporting
Change-Id: Ibfdb0eeebec785438d46a0e8e6e9f4c847bfb807
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/servicemanager.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index a4267f9d8442..f2c1a4c337bf 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -812,13 +812,19 @@ void cppuhelper::ServiceManager::loadImplementation(
if (ctor != nullptr) {
assert(!implementation->info->environment.isEmpty());
css::uno::Environment curEnv(css::uno::Environment::getCurrent());
+ if (!curEnv.is()) {
+ throw css::uno::DeploymentException(
+ "cannot get current environment",
+ css::uno::Reference<css::uno::XInterface>());
+ }
css::uno::Environment env(
cppuhelper::detail::getEnvironment(
implementation->info->environment,
implementation->info->name));
- if (!(curEnv.is() && env.is())) {
+ if (!env.is()) {
throw css::uno::DeploymentException(
- "cannot get environments",
+ ("cannot get environment "
+ + implementation->info->environment),
css::uno::Reference<css::uno::XInterface>());
}
if (curEnv.get() != env.get()) {