diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /comphelper/source | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff) |
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/configurationhelper.cxx | 9 | ||||
-rw-r--r-- | comphelper/source/misc/sequenceashashmap.cxx | 12 | ||||
-rw-r--r-- | comphelper/source/processfactory/processfactory.cxx | 3 |
3 files changed, 8 insertions, 16 deletions
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx index 837fd5de3e86..b388162fa464 100644 --- a/comphelper/source/misc/configurationhelper.cxx +++ b/comphelper/source/misc/configurationhelper.cxx @@ -91,8 +91,7 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs sMsg.appendAscii("\" does not exists." ); throw css::container::NoSuchElementException( - sMsg.makeStringAndClear(), - css::uno::Reference< css::uno::XInterface >()); + sMsg.makeStringAndClear()); } return xProps->getPropertyValue(sKey); } @@ -115,8 +114,7 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno:: sMsg.appendAscii("\" does not exists." ); throw css::container::NoSuchElementException( - sMsg.makeStringAndClear(), - css::uno::Reference< css::uno::XInterface >()); + sMsg.makeStringAndClear()); } xProps->setPropertyValue(sKey, aValue); } @@ -137,8 +135,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode sMsg.appendAscii("\" does not exists." ); throw css::container::NoSuchElementException( - sMsg.makeStringAndClear(), - css::uno::Reference< css::uno::XInterface >()); + sMsg.makeStringAndClear()); } css::uno::Reference< css::uno::XInterface > xNode; diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index 1023dbea1490..35f2d6bf118a 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -76,8 +76,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource) } throw css::beans::IllegalTypeException( - OUString( "Any contains wrong type." ), - css::uno::Reference< css::uno::XInterface >()); + "Any contains wrong type." ); } @@ -96,8 +95,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (!lP.Value.hasValue()) ) throw css::beans::IllegalTypeException( - OUString( "PropertyValue struct contains no useful information." ), - css::uno::Reference< css::uno::XInterface >()); + "PropertyValue struct contains no useful information." ); (*this)[lP.Name] = lP.Value; continue; } @@ -110,8 +108,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (!lN.Value.hasValue()) ) throw css::beans::IllegalTypeException( - OUString( "NamedValue struct contains no useful information." ), - css::uno::Reference< css::uno::XInterface >()); + "NamedValue struct contains no useful information." ); (*this)[lN.Name] = lN.Value; continue; } @@ -119,8 +116,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS // ignore VOID Any ... but reject wrong filled ones! if (lSource[i].hasValue()) throw css::beans::IllegalTypeException( - OUString( "Any contains wrong type." ), - css::uno::Reference< css::uno::XInterface >()); + "Any contains wrong type." ); } } diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 65c08ebad790..04c81cb3d7d7 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -61,8 +61,7 @@ Reference< XMultiServiceFactory > getProcessServiceFactory() xReturn = localProcessFactory( xReturn, false ); if ( !xReturn.is() ) { - throw DeploymentException( - "null process service factory", Reference< XInterface >() ); + throw DeploymentException( "null process service factory" ); } return xReturn; } |