summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-16 15:01:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-16 15:01:42 +0200
commit336353a87e6003e685aab87ea74a158546e1f297 (patch)
tree6d32698019589a88b2a57350bab8afe312f86a44
parent63b4633cf7b0da9eba63e752cec72cb10ed9d93e (diff)
Related rhbz#867808: More apparently bogus "throw new ..." in C++ code
Change-Id: I5d723b389f1ed20f7962807b782f44f6f3c61882
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx4
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx2
-rw-r--r--stoc/source/registry_tdprovider/functiondescription.cxx4
-rw-r--r--testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx6
4 files changed, 8 insertions, 8 deletions
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
index d5a66169a634..0577ad974338 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
@@ -74,7 +74,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
css::uno::Reference< css::lang::XMultiComponentFactory > factory(
context->getServiceManager());
if (!factory.is()) {
- throw new css::uno::RuntimeException(
+ throw css::uno::RuntimeException(
OUString( "no component context service manager" ),
static_cast< cppu::OWeakObject * >(this));
}
@@ -94,7 +94,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
}
relay->start(this);
if (!data.setData(reinterpret_cast< void * >(12345))) {
- throw new css::uno::RuntimeException(
+ throw css::uno::RuntimeException(
OUString( "osl::ThreadData::setData failed" ),
static_cast< cppu::OWeakObject * >(this));
}
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
index d81876f91895..6a0258a87651 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
@@ -63,7 +63,7 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) {
css::uno::Reference< css::lang::XMultiComponentFactory > factory(
context->getServiceManager());
if (!factory.is()) {
- throw new css::uno::RuntimeException(
+ throw css::uno::RuntimeException(
OUString( "no component context service manager" ),
static_cast< cppu::OWeakObject * >(this));
}
diff --git a/stoc/source/registry_tdprovider/functiondescription.cxx b/stoc/source/registry_tdprovider/functiondescription.cxx
index 3b477d15c285..bbdb3aa51568 100644
--- a/stoc/source/registry_tdprovider/functiondescription.cxx
+++ b/stoc/source/registry_tdprovider/functiondescription.cxx
@@ -71,7 +71,7 @@ FunctionDescription::getExceptions() const {
try {
any = m_manager->getByHierarchicalName(name);
} catch (const css::container::NoSuchElementException & e) {
- throw new css::uno::RuntimeException(
+ throw css::uno::RuntimeException(
(OUString(
"com.sun.star.container.NoSuchElementException: ")
+ e.Message),
@@ -80,7 +80,7 @@ FunctionDescription::getExceptions() const {
if (!(any >>= exceptions[i])
|| exceptions[i]->getTypeClass() != css::uno::TypeClass_EXCEPTION)
{
- throw new css::uno::RuntimeException(
+ throw css::uno::RuntimeException(
(OUString("not an exception type: ")
+ name),
css::uno::Reference< css::uno::XInterface >()); //TODO
diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
index c2e7bda150d6..7d08eab71db1 100644
--- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
+++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
@@ -799,7 +799,7 @@ static bool raiseException(XBridgeTest* xLBT )
bRet = performQueryForUnknownType( xLBT ) && bRet;
if (! bRet)
{
- throw new unoidl::com::sun::star::uno::RuntimeException(
+ throw unoidl::com::sun::star::uno::RuntimeException(
new String("error: test failed!"), 0);
}
}
@@ -819,7 +819,7 @@ static bool raiseException(XBridgeTest* xLBT )
{
if (args->Length < 1)
{
- throw new RuntimeException(
+ throw RuntimeException(
"missing argument for bridgetest!", this );
}
Object* test_obj =
@@ -846,7 +846,7 @@ static bool raiseException(XBridgeTest* xLBT )
s->Append(exc->GetType()->Name);
s->Append(S"\n Message: ");
s->Append(exc->Message);
- throw new unoidl::com::sun::star::uno::RuntimeException(
+ throw unoidl::com::sun::star::uno::RuntimeException(
s->ToString(), 0);
}
}