diff options
Diffstat (limited to 'unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx')
-rw-r--r-- | unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx index 3829bd1b3b6e..6f1f6795edcf 100644 --- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx +++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx @@ -59,7 +59,7 @@ std::string convert(rtl::OUString const & s16) { : static_cast< std::string::size_type >(s8.getLength()))); } -class Prot : public cppunittester::LibreOfficeProtector, private boost::noncopyable +class Prot : public CppUnit::Protector, private boost::noncopyable { public: Prot() {} @@ -69,8 +69,6 @@ public: virtual bool protect( CppUnit::Functor const & functor, CppUnit::ProtectorContext const & context); - - virtual bool protect(CppUnit::Functor const & functor); }; bool Prot::protect( @@ -93,27 +91,6 @@ bool Prot::protect( return false; } -bool Prot::protect(CppUnit::Functor const & functor) -{ - bool bRet = false; - try - { - bRet = functor(); - } catch (const css::uno::Exception &e) - { - css::uno::Any a(cppu::getCaughtException()); - std::cerr - << convert(rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "An uncaught exception of type ")) - + a.getValueTypeName()) - << std::endl << "Exception Message was: " << convert(e.Message) - << std::endl; - throw; - } - return bRet; -} - } extern "C" SAL_DLLPUBLIC_EXPORT CppUnit::Protector * SAL_CALL |