summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-04-01 15:16:27 +0000
committerRüdiger Timm <rt@openoffice.org>2005-04-01 15:16:27 +0000
commitdc9b4e8bc8adb3aafb6d1255dc3d85a8fc65c501 (patch)
tree4e344181b137a9d52d52145722dd3850a9c2ac99 /comphelper
parent1e7911cc0530c25327bd737fc6a5769acecb8b73 (diff)
INTEGRATION: CWS fwkfinal6 (1.2.46); FILE MERGED
2005/03/23 08:48:34 as 1.2.46.1: #i45787# check references to be more stable
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/configurationhelper.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx
index 2de453751647..4726f0e9e2af 100644
--- a/comphelper/source/misc/configurationhelper.cxx
+++ b/comphelper/source/misc/configurationhelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configurationhelper.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: obo $ $Date: 2004-11-17 13:39:56 $
+ * last change: $Author: rt $ $Date: 2005-04-01 16:16:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,6 +135,17 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs
css::uno::Reference< css::beans::XPropertySet > xProps;
xAccess->getByHierarchicalName(sRelPath) >>= xProps;
+ if (!xProps.is())
+ {
+ ::rtl::OUStringBuffer sMsg(256);
+ sMsg.appendAscii("The requested path \"");
+ sMsg.append (sRelPath );
+ sMsg.appendAscii("\" does not exists." );
+
+ throw css::container::NoSuchElementException(
+ sMsg.makeStringAndClear(),
+ css::uno::Reference< css::uno::XInterface >());
+ }
return xProps->getPropertyValue(sKey);
}
@@ -148,6 +159,17 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::
css::uno::Reference< css::beans::XPropertySet > xProps;
xAccess->getByHierarchicalName(sRelPath) >>= xProps;
+ if (!xProps.is())
+ {
+ ::rtl::OUStringBuffer sMsg(256);
+ sMsg.appendAscii("The requested path \"");
+ sMsg.append (sRelPath );
+ sMsg.appendAscii("\" does not exists." );
+
+ throw css::container::NoSuchElementException(
+ sMsg.makeStringAndClear(),
+ css::uno::Reference< css::uno::XInterface >());
+ }
xProps->setPropertyValue(sKey, aValue);
}