summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 12:24:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-02 07:48:21 +0000
commitc0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 (patch)
treee5bb6d31a17587452dde579803286f68ffc73672 /extensions
parentconvert BmpCombine to scoped enum and drop unused (diff)
downloadcore-c0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27.tar.gz
core-c0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27.zip
unnecessary use of OUStringBuffer in throwing exceptions
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f Reviewed-on: https://gerrit.libreoffice.org/33788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index a1a0fde40b64..87d686e39082 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -148,10 +148,7 @@ void LdapConnection::initConnection()
{
if (mLdapDefinition.mServer.isEmpty())
{
- OUStringBuffer message ;
-
- message.append("Cannot initialise connection to LDAP: No server specified.") ;
- throw ldap::LdapConnectionException(message.makeStringAndClear()) ;
+ throw ldap::LdapConnectionException("Cannot initialise connection to LDAP: No server specified.");
}
if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT;
@@ -165,13 +162,9 @@ void LdapConnection::initConnection()
#endif
if (mConnection == nullptr)
{
- OUStringBuffer message ;
-
- message.append("Cannot initialise connection to LDAP server ") ;
- message.append(mLdapDefinition.mServer) ;
- message.append(":") ;
- message.append(mLdapDefinition.mPort) ;
- throw ldap::LdapConnectionException(message.makeStringAndClear());
+ throw ldap::LdapConnectionException(
+ "Cannot initialise connection to LDAP server "
+ + mLdapDefinition.mServer + ":" + OUString::number(mLdapDefinition.mPort));
}
}