Kaydet (Commit) 336353a8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Related rhbz#867808: More apparently bogus "throw new ..." in C++ code

Change-Id: I5d723b389f1ed20f7962807b782f44f6f3c61882
üst 63b4633c
......@@ -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));
}
......
......@@ -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));
}
......
......@@ -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
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment