summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/dapiuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/dapiuno.cxx')
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 8bf22f9f4925..1bc766238ce3 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -48,6 +48,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/NullPointerException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sheet/XHierarchiesSupplier.hpp>
#include <com/sun/star/sheet/XLevelsSupplier.hpp>
#include <com/sun/star/sheet/XMembersSupplier.hpp>
@@ -63,6 +64,7 @@
#include <comphelper/propertysequence.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/exc_hlp.hxx>
using namespace com::sun::star;
using namespace com::sun::star::sheet;
@@ -2664,9 +2666,12 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
}
catch (const container::NoSuchElementException&)
{
+ css::uno::Any anyEx = cppu::getCaughtException();
SAL_WARN("sc.ui", "Cannot find field with that name: " + sNewDim + ".");
// Avoid throwing exception that's not specified in the method signature.
- throw RuntimeException("Cannot find field with name \"" + sNewDim + "\"", static_cast<cppu::OWeakObject*>(this));
+ throw css::lang::WrappedTargetRuntimeException(
+ "Cannot find field with name \"" + sNewDim + "\"",
+ static_cast<cppu::OWeakObject*>(this), anyEx );
}
}
}