summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
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));
}
}