summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-02 22:04:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-05 10:54:19 +0100
commit5fc869912893826d615661fbd88bf9cdbd60690f (patch)
treed6ba9f17c371806d2df32f5de1c67bbba2cdbcb9
parent8be4261608251630017f88faae0fbf696016a96a (diff)
tell me *what* failed
-rw-r--r--comphelper/source/misc/storagehelper.cxx22
1 files changed, 16 insertions, 6 deletions
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 52b8e677f5ab..7e8bdec3a153 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -64,12 +64,17 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetStorageFactory(
if ( !xFactory.is() )
throw uno::RuntimeException();
+ rtl::OUString sService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory"));
+
uno::Reference < lang::XSingleServiceFactory > xStorageFactory(
- xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ),
- uno::UNO_QUERY );
+ xFactory->createInstance(sService), uno::UNO_QUERY);
if ( !xStorageFactory.is() )
- throw uno::RuntimeException();
+ {
+ throw uno::RuntimeException(rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Could not load: ")) + sService,
+ uno::Reference< uno::XInterface >());
+ }
return xStorageFactory;
}
@@ -83,12 +88,17 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetFileSystemStora
if ( !xFactory.is() )
throw uno::RuntimeException();
+ rtl::OUString sService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.FileSystemStorageFactory"));
+
uno::Reference < lang::XSingleServiceFactory > xStorageFactory(
- xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.FileSystemStorageFactory" )) ),
- uno::UNO_QUERY );
+ xFactory->createInstance(sService), uno::UNO_QUERY);
if ( !xStorageFactory.is() )
- throw uno::RuntimeException();
+ {
+ throw uno::RuntimeException(rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Could not load: ")) + sService,
+ uno::Reference< uno::XInterface >());
+ }
return xStorageFactory;
}