diff options
Diffstat (limited to 'ucb/source/ucp/gio/gio_content.cxx')
-rw-r--r-- | ucb/source/ucp/gio/gio_content.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 2f71f03d903b..96dbd72e016f 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/io/XActiveDataSink.hpp> #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/lang/IllegalAccessException.hpp> +#include <com/sun/star/lang/WrappedTargetException.hpp> #include <com/sun/star/ucb/ContentInfoAttribute.hpp> #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp> @@ -58,6 +59,7 @@ #include <com/sun/star/ucb/XContentCreator.hpp> #include <comphelper/processfactory.hxx> +#include <cppuhelper/exc_hlp.hxx> #include <ucbhelper/contentidentifier.hxx> #include <ucbhelper/propertyvalueset.hxx> #include <ucbhelper/interactionrequest.hxx> @@ -283,6 +285,30 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac return aRet; } +void convertToIOException(GError *pError, const uno::Reference< uno::XInterface >& rContext) + throw( io::IOException, uno::RuntimeException, std::exception ) +{ + try + { + convertToException(pError, rContext); + } + catch (const io::IOException&) + { + throw; + } + catch (const uno::RuntimeException&) + { + throw; + } + catch (const uno::Exception& e) + { + css::uno::Any a(cppu::getCaughtException()); + throw css::lang::WrappedTargetException( + "wrapped Exception " + e.Message, + css::uno::Reference<css::uno::XInterface>(), a); + } +} + uno::Any Content::mapGIOError( GError *pError ) { if (!pError) |