summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
index e58c78eaff2a..ed2c4f7d4887 100644
--- a/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+++ b/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
@@ -95,9 +95,12 @@ bool Prot::protect(
bool Prot::protect(CppUnit::Functor const & functor)
{
- try {
- return functor();
- } catch (const css::uno::Exception &e) {
+ bool bRet = false;
+ try
+ {
+ bRet = functor();
+ } catch (const css::uno::Exception &e)
+ {
css::uno::Any a(cppu::getCaughtException());
std::cerr
<< convert(rtl::OUString(
@@ -108,7 +111,7 @@ bool Prot::protect(CppUnit::Functor const & functor)
<< std::endl;
throw;
}
- return false;
+ return bRet;
}
}