summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx21
-rw-r--r--ucb/source/core/FileAccess.cxx7
-rw-r--r--ucb/source/ucp/ftp/ftpcontentprovider.cxx7
-rw-r--r--ucb/source/ucp/package/pkgprovider.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx11
5 files changed, 37 insertions, 13 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 0c7bc5ef2a76..77d897007076 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -302,9 +302,12 @@ OUString const & CachedContentResultSet::CCRS_Cache
}
return *o3tl::doAccess<OUString>(getRowAny(nRow));
}
- catch(const SQLException&)
+ catch(const SQLException& ex)
{
- throw RuntimeException();
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( ex.Message,
+ css::uno::Reference< css::uno::XInterface >(),
+ anyEx );
}
}
@@ -323,9 +326,12 @@ Reference< XContentIdentifier > CachedContentResultSet::CCRS_Cache
}
return *o3tl::doAccess<Reference<XContentIdentifier>>(getRowAny(nRow));
}
- catch(const SQLException&)
+ catch(const SQLException& ex)
{
- throw RuntimeException();
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( ex.Message,
+ css::uno::Reference< css::uno::XInterface >(),
+ anyEx );
}
}
@@ -344,9 +350,12 @@ Reference< XContent > CachedContentResultSet::CCRS_Cache
}
return *o3tl::doAccess<Reference<XContent>>(getRowAny(nRow));
}
- catch (const SQLException&)
+ catch (const SQLException& ex)
{
- throw RuntimeException();
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( ex.Message,
+ css::uno::Reference< css::uno::XInterface >(),
+ anyEx );
}
}
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index a581ff4f226f..9d7de62bfc56 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -18,6 +18,7 @@
*/
#include <uno/mapping.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
@@ -33,6 +34,7 @@
#include <com/sun/star/io/XActiveDataSink.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/ucb/CommandFailedException.hpp>
@@ -238,9 +240,10 @@ void OFileAccess::transferImpl( const OUString& rSource,
}
catch ( Exception const & )
{
- throw RuntimeException(
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException(
"OFileAccess::transferrImpl - Unable to obtain destination folder URL!",
- static_cast< cppu::OWeakObject * >( this ) );
+ static_cast< cppu::OWeakObject * >( this ), anyEx );
}
transferImpl( rSource, aDestURL, bMoveData );
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
index 80dffdce8659..04dc472bb055 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
@@ -19,9 +19,11 @@
#include <sal/config.h>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <osl/socket.hxx>
#include "ftpcontentprovider.hxx"
#include "ftpcontent.hxx"
@@ -162,6 +164,11 @@ Reference<XContent> SAL_CALL FTPContentProvider::queryContent(
{
try {
init();
+ } catch (css::uno::Exception const & ex) {
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( ex.Message,
+ css::uno::Reference< css::uno::XInterface >(),
+ anyEx );
} catch( ... ) {
throw RuntimeException();
}
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index ddc3ba5d8210..5c1b6d263785 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -25,6 +25,7 @@
*************************************************************************/
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
@@ -238,8 +239,9 @@ ContentProvider::createPackage( const PackageUri & rURI )
}
catch ( uno::Exception const & e )
{
+ css::uno::Any anyEx = cppu::getCaughtException();
throw css::lang::WrappedTargetRuntimeException(
- e.Message, e.Context, css::uno::makeAny(e));
+ e.Message, e.Context, anyEx);
}
rtl::Reference< Package> xPackage = new Package( rURL, xNameAccess, this );
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index c1f393eae31f..95a64428f57c 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/embed/StorageWrappedTargetException.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/packages/NoEncryptionException.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include "tdoc_uri.hxx"
@@ -425,23 +426,25 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
"Bug! Value of property OpenMode has wrong type!" );
}
}
- catch ( beans::UnknownPropertyException const & e )
+ catch ( beans::UnknownPropertyException const & )
{
+ css::uno::Any anyEx = cppu::getCaughtException();
OSL_FAIL( "Property OpenMode not supported!" );
throw embed::StorageWrappedTargetException(
"Bug! Value of property OpenMode has wrong type!",
uno::Reference< uno::XInterface >(),
- uno::makeAny( e ) );
+ anyEx );
}
- catch ( lang::WrappedTargetException const & e )
+ catch ( lang::WrappedTargetException const & )
{
+ css::uno::Any anyEx = cppu::getCaughtException();
OSL_FAIL( "Caught WrappedTargetException!" );
throw embed::StorageWrappedTargetException(
"WrappedTargetException during getPropertyValue!",
uno::Reference< uno::XInterface >(),
- uno::makeAny( e ) );
+ anyEx );
}
}
else